content
stringlengths
5
1.05M
local uv = require "lluv" local path = require "path" local round_robin_counter = 0 local child_worker_count = #uv.cpu_info() local workers = {} local fprintf = function(f, ...) f:write((string.format(...))) end local stderr = io.stderr local function close_process_handle(handle, err, exit_status, term_signal) handle:close() for i, worker in ipairs(workers) do if worker.proc == handle then worker.pipe:close() table.remove(workers, i) break end end if err then fprintf(stderr, "Spawn error: %s\n", tostring(err)) else fprintf(stderr, "Process exited with status %d, signal %d\n", exit_status, term_signal) end child_worker_count = #workers if child_worker_count == 0 then fprintf(stderr, "All workers are dead.\n") uv.stop() end end local function on_new_connection(server, err) if err then fprintf(stderr, "Listen error: %s\n", tostring(err)) return; end local cli, err = server:accept() if not cli then fprintf(stderr, "Accept error: %s\n", tostring(err)) return end fprintf(stderr, "Accept : %s\n", cli:getsockname()) round_robin_counter = round_robin_counter % child_worker_count + 1 local worker = assert(workers[round_robin_counter], round_robin_counter) local ok, err = worker.pipe:write2(cli, function() cli:close() end) if not ok then fprintf(stderr, "Write2 error: %s\n", tostring(err)) cli:close() return end end local function setup_workers(fname) local lua_path = uv.exepath() local worker_path = path.join( path.currentdir(), fname) fprintf(stderr, "Lua path: %s\n", lua_path); fprintf(stderr, "Worker path: %s\n", worker_path); for i = 1, #uv.cpu_info() do local worker = { id = tostring(i), pipe = uv.pipe(true), } worker.proc = uv.spawn({ file = lua_path, args = {worker_path, worker.id}, stdio = { -- Windows fail create pipe in worker without `writable` flag { flags = {"create_pipe", "readable_pipe", "writable_pipe"}; stream = worker.pipe; }, {}, -- ignore 2, -- inherite fd } }, close_process_handle) workers[i] = worker end end ---------------------------------------------------- setup_workers("worker.lua") uv.tcp():bind("*", 7000, function(server, err, host, port) if err then fprintf(stderr, "Bind error %s\n", tostring(err)) return uv.stop() end fprintf(stderr, "Bind on %s:%d\n", host, port) server:listen(on_new_connection) end) uv.run(debug.traceback);
----------------------------------- -- Area: Windurst Waters -- NPC: Serukoko -- Type: Standard NPC -- !pos -54.916 -7.499 114.855 238 -- -- Auto-Script: Requires Verification (Verfied By Brawndo) ----------------------------------- function onTrade(player, npc, trade) end function onTrigger(player, npc) player:startEvent(373) end function onEventUpdate(player, csid, option) end function onEventFinish(player, csid, option) end
local _, L = ... local frame = _G[ _ .. 'Frame' ] ---------------------------------- -- Animations to play on show ---------------------------------- local __inAnims = { frame.TalkBox.MainFrame.InAnim, frame.TalkBox.NameFrame.FadeIn, -- frame.TalkBox.TextFrame.FadeIn, frame.TalkBox.PortraitFrame.FadeIn, } local function PlayInAnimations(self, playAnimations) if playAnimations and ( self.timeStamp ~= GetTime() ) then for _, animation in ipairs(__inAnims) do animation:Play() end end end ---------------------------------- -- Fade manager ---------------------------------- local __cacheAlphaIgnored = {} local __staticAlphaIgnored = { [AlertFrame] = true, [DressUpFrame] = true, -- [LevelUpDisplay] = true, [StaticPopup1] = true, [StaticPopup2] = true, [StaticPopup3] = true, [StaticPopup4] = true, [SubZoneTextFrame] = true, [ShoppingTooltip1] = true, [ShoppingTooltip2] = true, } local __staticHideFrames = { [MinimapCluster] = true, } if LevelUpDisplay then __staticAlphaIgnored[LevelUpDisplay] = true end ---------------------------------- local FadeIn, FadeOut = L.UIFrameFadeIn, L.UIFrameFadeOut ---------------------------------- -- For config to cache certain frames for fade ignore/force. function L.ToggleIgnoreFrame(frame, ignore) if frame then __cacheAlphaIgnored[frame] = ignore frame:SetIgnoreParentAlpha(ignore) end end -- Return a list of all frames to ignore and their current -- setting towards ignoring UIParent's alpha value. local function GetFramesToIgnore() local frames = {} -- Store ignore state so it can be reset on release. for frame in pairs(__staticAlphaIgnored) do frames[frame] = frame:IsIgnoringParentAlpha() end -- Union with cache. for frame, shouldIgnore in pairs(__cacheAlphaIgnored) do if shouldIgnore then frames[frame] = frame:IsIgnoringParentAlpha() end end return frames end -- Restore the temporary changes on release. local function RestoreFadedFrames(self) FadeIn(UIParent, 0.5, UIParent:GetAlpha(), 1) local framesToIgnore = self.ignoredFadeFrames if framesToIgnore then for frame, ignoreParentAlpha in pairs(framesToIgnore) do frame:SetIgnoreParentAlpha(ignoreParentAlpha) end for frame in pairs(__staticHideFrames) do if not __cacheAlphaIgnored[frame] then FadeIn(frame, 0.5, frame:GetAlpha(), 1) frame:Show() end end self.ignoredFadeFrames = nil end end ---------------------------------- -- Exposed to logic layer ---------------------------------- function frame:FadeIn(fadeTime, playAnimations, ignoreFrameFade) fadeTime = fadeTime or 0.2 self.fadeState = 'in' FadeIn(self, fadeTime, self:GetAlpha(), 1) PlayInAnimations(self, playAnimations) if not ignoreFrameFade and L('hideui') and not self.ignoredFadeFrames then local framesToIgnore = GetFramesToIgnore() -- Fade out UIParent FadeOut(UIParent, fadeTime, UIParent:GetAlpha(), 0) -- Hide frames explicitly for frame in pairs(__staticHideFrames) do if not __cacheAlphaIgnored[frame] then FadeOut(frame, fadeTime, frame:GetAlpha(), 0, { finishedFunc = frame.Hide; finishedArg1 = frame; }) end end -- Set ignored frames to override the alpha change for frame in pairs(framesToIgnore) do frame:SetIgnoreParentAlpha(true) end self.ignoredFadeFrames = framesToIgnore end end function frame:FadeOut(fadeTime, ignoreOnTheFly) if ( self.fadeState ~= 'out' ) then FadeOut(self, fadeTime or 1, self:GetAlpha(), 0, { finishedFunc = self.Hide; finishedArg1 = self; }) self.fadeState = 'out' end RestoreFadedFrames(self) end ---------------------------------- -- Handle GameTooltip special case ---------------------------------- -- If the option to hide UI and to hide tooltip are ticked, -- user still needs to see the tooltip on an item or reward. do local function GameTooltipAlphaHandler(self) if L('hideui') then if L('hidetooltip') then self:SetIgnoreParentAlpha(not self:IsOwned(UIParent)) else self:SetIgnoreParentAlpha(true) end end end GameTooltip:HookScript('OnTooltipSetDefaultAnchor', GameTooltipAlphaHandler) GameTooltip:HookScript('OnTooltipSetItem', GameTooltipAlphaHandler) GameTooltip:HookScript('OnShow', GameTooltipAlphaHandler) end
--[[ Name: furniture_store.lua For: SantosRP By: Ultra ]]-- local MapProp = {} MapProp.ID = "furniture_store" MapProp.m_tblSpawn = { { mdl = 'models/props_c17/furniturechair001a.mdl',pos = Vector('3781.790039 -2671.989258 96.267715'), ang = Angle('-0.049 -51.471 0.044'), }, { mdl = 'models/props_wasteland/controlroom_filecabinet002a.mdl',pos = Vector('4024.033691 -2609.318848 111.349350'), ang = Angle('0.000 179.610 0.000'), }, { mdl = 'models/props_interiors/furniture_vanity01a.mdl',pos = Vector('3830.031738 -2580.869873 111.567810'), ang = Angle('-0.154 -89.901 -0.077'), }, { mdl = 'models/props_c17/furniturechair001a.mdl',pos = Vector('3777.422607 -2703.878662 96.333328'), ang = Angle('-0.170 35.739 0.000'), }, { mdl = 'models/props_c17/furniturechair001a.mdl',pos = Vector('3813.169434 -2678.741699 96.326668'), ang = Angle('0.093 -151.507 0.242'), }, { mdl = 'models/props_interiors/furniture_couch02a.mdl',pos = Vector('3648.373535 -2658.860107 97.879440'), ang = Angle('-0.033 11.074 0.000'), }, { mdl = 'models/props_c17/furniturechair001a.mdl',pos = Vector('3807.182617 -2708.736816 96.305199'), ang = Angle('-0.330 125.250 0.000'), }, { mdl = 'models/props_c17/furnituredrawer002a.mdl',pos = Vector('3642.439453 -2593.560303 92.965065'), ang = Angle('0.302 -39.260 0.000'), }, { mdl = 'models/props_interiors/furniture_couch01a.mdl',pos = Vector('3672.076416 -2814.098389 97.785774'), ang = Angle('0.000 90.000 0.000'), }, { mdl = 'models/props_c17/furnituredresser001a.mdl',pos = Vector('3728.365479 -2584.498291 117.272858'), ang = Angle('1.445 -90.000 -0.005'), }, { mdl = 'models/props_c17/furnituredrawer003a.mdl',pos = Vector('4033.184082 -2752.447266 98.640221'), ang = Angle('-0.049 -179.978 -0.170'), }, { mdl = 'models/props_c17/shelfunit01a.mdl',pos = Vector('4029.507324 -2707.405273 75.165947'), ang = Angle('0.022 89.984 0.016'), }, { mdl = 'models/props_wasteland/controlroom_filecabinet002a.mdl',pos = Vector('4024.110840 -2586.046387 111.388824'), ang = Angle('-0.148 179.539 0.000'), }, { mdl = 'models/props_combine/breenchair.mdl',pos = Vector('3967.208008 -2600.605225 76.423683'), ang = Angle('-0.121 -138.510 0.374'), }, { mdl = 'models/props_c17/furnituretable003a.mdl',pos = Vector('3670.366455 -2769.888916 87.032753'), ang = Angle('0.071 89.934 0.011'), }, { mdl = 'models/props_c17/furnituretable001a.mdl',pos = Vector('3795.976563 -2690.749512 94.285042'), ang = Angle('0.066 -147.299 0.192'), }, { mdl = 'models/props_c17/furniturecouch001a.mdl',pos = Vector('3671.052002 -2718.065918 92.965546'), ang = Angle('0.038 -89.995 0.000'), }, { mdl = 'models/props_interiors/furniture_lamp01a.mdl',pos = Vector('3640.758301 -2621.729492 109.745697'), ang = Angle('0.335 -75.745 0.000'), }, { mdl = 'models/props_combine/breendesk.mdl',pos = Vector('3932.906738 -2621.725342 76.424904'), ang = Angle('0.016 -142.202 0.000'), }, { mdl = 'models/props_c17/furnituredrawer001a.mdl',pos = Vector('3779.316895 -2582.112549 96.510872'), ang = Angle('0.401 -89.978 0.027'), }, } GAMEMODE.Map:RegisterMapProp( MapProp )
return { 'hoob3rt/lualine.nvim', requires = {'kyazdani42/nvim-web-devicons', opt = true}, config = function () require('plugin.lualine.config') end, }
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BcePRCOpen_pb', package.seeall) local BCEPRCOPEN = protobuf.Descriptor(); BCEPRCOPEN.name = "BcePRCOpen" BCEPRCOPEN.full_name = ".com.xinqihd.sns.gameserver.proto.BcePRCOpen" BCEPRCOPEN.nested_types = {} BCEPRCOPEN.enum_types = {} BCEPRCOPEN.fields = {} BCEPRCOPEN.is_extendable = false BCEPRCOPEN.extensions = {} BcePRCOpen = protobuf.Message(BCEPRCOPEN) _G.BCEPRCOPEN_PB_BCEPRCOPEN = BCEPRCOPEN
class("FetchEvaluationCommand", pm.SimpleCommand).execute = function (slot0, slot1) slot3 = pg.TimeMgr.GetInstance():GetServerTime() if not getProxy(CollectionProxy):getShipGroup(slot1:getBody()) then return end if ShipGroup.REQ_INTERVAL < slot3 - slot5.lastReqStamp then pg.ConnectionMgr.GetInstance():Send(17101, { ship_group_id = slot2 }, 17102, function (slot0) if slot0.ship_discuss and slot1.ship_group_id == slot0 then if slot1 then slot1.evaluation = ShipEvaluation.New(slot1) slot1.lastReqStamp = pg.TimeMgr.GetInstance():GetServerTime() slot1:updateShipGroup(slot1) slot1:sendNotification(GAME.FETCH_EVALUATION_DONE, slot0) end else pg.TipsMgr.GetInstance():ShowTips(errorTip("fetch_ship_eva", slot0.result)) end end) elseif slot5.evaluation then slot0.sendNotification(slot0, GAME.FETCH_EVALUATION_DONE, slot2) end end return class("FetchEvaluationCommand", pm.SimpleCommand)
------------------------------------------------------------------------------------------------------------------------------------------------------------- -- VEAF mission normalizer tool for DCS World -- By Zip (2020) -- -- Features: -- --------- -- This tool processes all files in a mission, apply filters to normalize them and writes them back. -- Usually, DCSW Mission Editor shuffles the data in the mission files each time the mission is saved, making it all but impossible to compare with a previous version. -- With this tool, it becomes easy to compare mission files after an edition in DCS World Mission Editor. -- -- Prerequisite: -- ------------ -- * The mission file archive must already be exploded ; the script only works on the mission files, not directly on the .miz archive -- -- Basic Usage: -- ------------ -- The following workflow should be used : -- * explode the mission (unzip it) -- * run the normalizer on the exploded mission -- * version the exploded mission files (save it, back it up, commit it to a source control system, whatever fits your routine) -- * compile the mission (zip the exploded files again) -- * edit the compiled mission with DCSW Mission Editor -- * explode the mission (unzip it) -- * run the normalizer on the exploded mission -- * now you can run a comparison between the exploded mission and its previous version -- -- Call the script by running it in a lua environment ; it needs the veafMissionEditor library, so the script working directory must contain the veafMissionEditor.lua file -- -- veafMissionNormalizer.lua <mission folder path> [-debug|-trace] -- -- Command line options: -- * <mission folder path> the path to the exploded mission files (no trailing backslash) -- * -debug if set, the script will output some information ; useful to find out which units were edited -- * -trace if set, the script will output a lot of information : useful to understand what went wrong -- ------------------------------------------------------------------------------------------------------------------------------------------------------------- veafMissionNormalizer = {} ------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Global settings. Stores the script constants ------------------------------------------------------------------------------------------------------------------------------------------------------------- --- Identifier. All output in the log will start with this. veafMissionNormalizer.Id = "NORMALIZER - " --- Version. veafMissionNormalizer.Version = "1.1.0" -- trace level, specific to this module veafMissionNormalizer.Trace = false veafMissionNormalizer.Debug = false ------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Do not change anything below unless you know what you are doing! ------------------------------------------------------------------------------------------------------------------------------------------------------------- veafMissionNormalizer.KeysToSortById = {} veafMissionNormalizer.KeysToSortById["country"] = true ------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Utility methods ------------------------------------------------------------------------------------------------------------------------------------------------------------- function veafMissionNormalizer.logError(message) print(veafMissionNormalizer.Id .. message) end function veafMissionNormalizer.logInfo(message) print(veafMissionNormalizer.Id .. message) end function veafMissionNormalizer.logDebug(message) if message and veafMissionNormalizer.Debug then print(veafMissionNormalizer.Id .. message) end end function veafMissionNormalizer.logTrace(message) if message and veafMissionNormalizer.Trace then print(veafMissionNormalizer.Id .. message) end end ------------------------------------------------------------------------------------------------------------------------------------------------------------- -- Core methods ------------------------------------------------------------------------------------------------------------------------------------------------------------- require("veafMissionEditor") local function _sortTable(t, level) if level == nil then level = 0 end -- this function sorts by the value of the "id" key local _sortById = function(a, b) if a and a["id"] then veafMissionNormalizer.logTrace(string.format("_sortById: a[id]=%s", tostring(a["id"]))) local idA = a["id"] if type(idA) == "number" then idA = tonumber(idA) end if b and b["id"] then local idB = b["id"] if type(idB) == "number" then idB = tonumber(idB) end veafMissionNormalizer.logTrace(string.format("_sortById: b[id]=%s", tostring(b["id"]))) return idA < idB else return false end else return false end end if (type(t) == "table") then -- recurse for key, value in pairs(t) do if veafMissionNormalizer.KeysToSortById[key] then local text = "" for i = 0, level do text = text .. " " end veafMissionNormalizer.logDebug(string.format(text .. "sorting by id table [%s]", key)) -- sort by id table.sort(value, _sortById) end _sortTable(value, level + 1) end end end function veafMissionNormalizer.normalizeMission(filePath) local dictionaryKeysThatAreActuallyUsed = {} local WHATS_IN_A_DICTIONARY_KEY = "DictKey_" local function _recursivelySearchForDictionaryKeysInTable(t, dictionaryKeys) for key, value in pairs(t) do if type(value) == "table" then _recursivelySearchForDictionaryKeysInTable(value, dictionaryKeys) elseif type(value) == "string" then if value:lower():sub(1, #WHATS_IN_A_DICTIONARY_KEY) == WHATS_IN_A_DICTIONARY_KEY:lower() then dictionaryKeys[value:lower()] = value end end end end local function _processFunctionForMission(t) -- search for dictionary keys in the mission file _recursivelySearchForDictionaryKeysInTable(t, dictionaryKeysThatAreActuallyUsed) _sortTable(t) return t end local function _processFunctionForDictionary(t) -- only keep keys that have been referenced in dictionaryKeysThatAreActuallyUsed local result = {} local nSkippedKeys = 0 for key, value in pairs(t) do if dictionaryKeysThatAreActuallyUsed[key:lower()] then result[key] = value else veafMissionNormalizer.logDebug(string.format("removing unused dictionary key [%s]=%s" , key, tostring(value))) nSkippedKeys = nSkippedKeys + 1 end end if nSkippedKeys > 0 then veafMissionNormalizer.logInfo(string.format("removed %d unused keys from dictionary" , nSkippedKeys)) end _sortTable(result) return result end -- normalize "mission" file local _filePath = filePath .. "\\mission" veafMissionEditor.editMission(_filePath, _filePath, "mission", _processFunctionForMission) -- normalize "dictionary" file _filePath = filePath .. "\\l10n\\DEFAULT\\dictionary" veafMissionEditor.editMission(_filePath, _filePath, "dictionary", _processFunctionForDictionary) -- normalize "warehouses" file _filePath = filePath .. "\\warehouses" veafMissionEditor.editMission(_filePath, _filePath, "warehouses") -- normalize "options" file -- _filePath = filePath .. "\\options" -- veafMissionEditor.editMission(_filePath, _filePath, "options") -- normalize "mapResource" file _filePath = filePath .. "\\l10n\\DEFAULT\\mapResource" veafMissionEditor.editMission(_filePath, _filePath, "mapResource") end veafMissionNormalizer.logDebug(string.format("#arg=%d", #arg)) local debug = false local trace = false for i = 0, #arg do veafMissionNormalizer.logDebug(string.format("arg[%d]=%s", i, arg[i])) if arg[i] and arg[i]:upper() == "-DEBUG" then debug = true end if arg[i] and arg[i]:upper() == "-TRACE" then trace = true end end if #arg < 1 then veafMissionNormalizer.logError("USAGE : veafMissionNormalizer.lua <mission folder path>") return end if debug or trace then veafMissionNormalizer.Debug = true veafMissionEditor.Debug = true if trace then veafMissionNormalizer.Trace = true veafMissionEditor.Trace = true end else veafMissionNormalizer.Debug = false veafMissionEditor.Debug = false veafMissionNormalizer.Trace = false veafMissionEditor.Trace = false end local filePath = arg[1] veafMissionNormalizer.normalizeMission(filePath)
if not gtdata_doc_dir then gtdata_doc_dir = "./" end print ([[ File format for option '-regionmapping': The file supplied to option -regionmapping defines a ``mapping''. A mapping maps the `sequence-region` entries given in the 'GFF3_file' to a sequence file containing the corresponding sequence. Mappings can be defined in one of the following two forms: ]]) print(io.open(gtdata_doc_dir.."regionmapping_table.lua"):read("*a")) print([[ or ]]) print(io.open(gtdata_doc_dir.."regionmapping_function.lua"):read("*a")) print([[ The first form defines a Lua (http://www.lua.org) table named ``mapping'' which maps each sequence region to the corresponding sequence file. The second one defines a Lua function ``mapping'', which has to return the sequence file name when it is called with the `sequence_region` as argument.]])
#!/usr/bin/env luajit local env = setmetatable({}, {__index=_G}) if setfenv then setfenv(1, env) else _ENV = env end require 'symmath'.setup{env=env, MathJax={title='Kaluza-Klein', useCommaDerivative=true}} --[[ g_ab = [ g_uv + phi^2 A_u A_v phi^2 A^u ] [ phi^2 A_v phi^2 ] g^ab = [ g^uv -A^u ] [ -A^v A^2 + phi^-2 ] --]] local t, x, y, z, w = vars('t', 'x', 'y', 'z', 'w') local coords = {t, x, y, z, w} -- w = x^5, or the A^mu vector combined with the phi^2 ... local phi = var('\\phi', {t,x,y,z,w}) local chart = Tensor.Chart{coords={t,x,y,z}} local chart5 = Tensor.Chart{coords={t,x,y,z,w}, symbols='abcdef'} -- 4D metric tensor -- keeping it 4D at the moment -- if one were so inclined they might insert the adm 3+1 metric here ... local gLL = Tensor('_uv', function(u,v) return var('g_{'..u..v..'}', coords) end) printbr'4D metric tensor:' printbr(var'g''_uv':eq(gLL'_uv'())) local gUU = Tensor('^uv', function(u,v) return var('g^{'..u..v..'}', coords) end) printbr('4D metric tensor inverse') printbr(var'g''^uv':eq(gUU'^uv'())) chart:setMetric(gLL, gUU) -- EM potential 4-vector printbr'EM potential vector:' local AL = Tensor('_u', function(u) return var('A_'..u, coords) end) printbr(var'A''_u':eq(AL'_u'())) local AU = Tensor('^u', function(u) return var('A^'..u, coords) end) printbr(var'A''^u':eq(AU'^u'())) local ASq = var('A^2', coords) -- helper for representing A^2 = A^u A_u printbr(ASq:eq(AU'^u' * AL'_u')()) -- 5D metric tensor printbr'5D metric tensor:' local g5LL = Tensor('_ab', function(a,b) if a < 5 and b < 5 then return gLL[a][b] + phi^2 * AL[a] * AL[b] elseif a < 5 then return phi^2 * AL[a] elseif b < 5 then return phi^2 * AL[b] else return phi^2 end end) printbr(var'\\tilde{g}''_ab':eq(g5LL'_ab'())) --[[ TODO g5LL['_uv'] = gLL'_uv' + phi^2 * AL'_u' * AL'_v' g5LL['_uw'] = phi^2 * AL'_u' g5LL['_wv'] = phi^2 * AL'_v' g5LL['_ww'] = phi^2 --]] printbr'5D metric tensor inverse:' local g5UU = Tensor('^ab', function(a,b) if a < 5 and b < 5 then return gUU[a][b] elseif a < 5 then return -AU[a] elseif b < 5 then return -AU[b] else return ASq + phi^-2 end end) --[[ TODO g5UU['^uv'] = gUU'_uv' g5UU['^uw'] = -AU'^u' g5UU['^wv'] = -AU'^v' g5UU['^ww'] = ASq + phi^-2 --]] printbr(var'\\tilde{g}''^ab':eq(g5UU'^ab')) chart5:setMetric(g5LL, g5UU, 'a') -- TODO think up better arguments for this printbr'cylindrical constraint:' local g5cylinderLL = g5LL'_ab':diff(w):eq(Tensor'_ab')() -- TODO allow g5LL'_ab,w' or g5LL'_ab,5' printbr(g5cylinderLL) -- TODO extract unique equations from tensor/tensor equality -- now comes the manual assumption that g5_ab,c = 0 ... local dg5 = g5LL'_ab,c'() local Gamma5 = ((dg5'_abc' + dg5'_acb' - dg5'_bca') / 2)() printbr'1st kind Christoffel:' printbr(var'\\Gamma''_abc':eq(Gamma5'_abc'())) -- 2nd kind printbr'2nd kind Christoffel:' Gamma5 = Gamma5'^a_bc'() -- should raise with the metric of 'a' ... which is the g5-metric printbr(var'\\Gamma''^a_bc':eq(Gamma5'^a_bc'()))
function love.conf(t) -- The LÖVE version this game was made for (string) t.version = "11.3" -- Attach a console (boolean, Windows only) t.console = false -- No window, we'll do this in main t.window = false -- Box2D... might use this t.modules.physics = false t.modules.joystick = false end
local nvim_tree = require("nvim-tree") local u = require("utils") u.nmap("<F3>", ":NvimTreeToggle<CR>") u.nmap("<F4>", ":NvimTreeRefresh<CR>") u.nmap("<F5>", ":NvimTreeFindFile<CR>") nvim_tree.setup({ -- disables netrw completely disable_netrw = true, -- hijack netrw window on startup hijack_netrw = false, -- open the tree when running this setup function open_on_setup = false, -- will not open on setup if the filetype is in this list ignore_ft_on_setup = {}, -- closes neovim automatically when the tree is the last **WINDOW** in the view auto_close = false, -- opens the tree when changing/opening a new tab if the tree wasn't previously opened open_on_tab = true, -- hijacks new directory buffers when they are opened. update_to_buf_dir = { -- enable the feature enable = true, -- allow to open the tree if it was previously closed auto_open = true, }, -- hijack the cursor in the tree to put it at the start of the filename hijack_cursor = false, -- updates the root directory of the tree on `DirChanged` (when your run `:cd` usually) update_cwd = false, -- show lsp diagnostics in the signcolumn diagnostics = { enable = false, icons = { hint = "", info = "", warning = "", error = "", }, }, -- update the focused file on `BufEnter`, un-collapses the folders recursively until it finds the file update_focused_file = { -- enables the feature enable = true, -- update the root directory of the tree to the one of the folder containing the file if the file is not under the current root directory -- only relevant when `update_focused_file.enable` is true update_cwd = true, -- list of buffer names / filetypes that will not update the cwd if the file isn't found under the current root directory -- only relevant when `update_focused_file.update_cwd` is true and `update_focused_file.enable` is true ignore_list = {}, }, -- configuration options for the system open command (`s` in the tree by default) system_open = { -- the command to run this, leaving nil should work in most cases cmd = nil, -- the command arguments as a list args = {}, }, view = { -- width of the window, can be either a number (columns) or a string in `%`, for left or right' | 'top' | 'bottom' width = "25%", side = "right", -- if true the tree will resize itself after opening a file auto_resize = true, mappings = { -- custom only false will merge the list with the default mappings -- if true, it will only use your list to set the mappings custom_only = false, -- list of mappings to set on the tree manually list = {}, }, }, })
local _, C = unpack(select(2, ...)) local _G = _G C.NameplateWhiteList = { -- Buffs [642] = true, -- 圣盾术 [1022] = true, -- 保护之手 [23920] = true, -- 法术反射 [45438] = true, -- 寒冰屏障 -- Debuffs [2094] = true, -- 致盲 } C.NameplateBlackList = { [15407] = true, -- 精神鞭笞 } C.NameplateCustomUnits = { [120651] = true, -- 爆炸物 } C.NameplateShowPowerList = { [155432] = true, -- 魔力使者 } C.PlayerNameplateWhiteList = { -- Druid [2893] = true, -- Abolish Poison [22812] = true, -- Barkskin [1850] = true, -- Dash [5229] = true, -- Enrage [22842] = true, -- Frenzied Regeneration [29166] = true, -- Innervate -- [24932] = true, -- Leader of the Pack [33763] = true, -- Lifebloom -- [45281] = true, -- Natural Perfection -- [16886] = true, -- Nature's Grace [16689] = true, -- Nature's Grasp [17116] = true, -- Nature's Swiftness -- [16870] = true, -- Omen of Clarity (Clearcasting) -- [5215] = true, -- Prowl [8936] = true, -- Regrowth [774] = true, -- Rejuvenation -- [34123] = true, -- Tree of Life [5217] = true, -- Tiger's Fury -- [5225] = true, -- Track Humanoids [740] = true, -- Tranquility -- Hunter -- [13161] = true, -- Aspect of the Beast [5118] = true, -- Aspect of the Cheetah -- [13165] = true, -- Aspect of the Hawk -- [13163] = true, -- Aspect of the Monkey [13159] = true, -- Aspect of the Pack [34074] = true, -- Aspect of the Viper -- [20043] = true, -- Aspect of the Wild [19574] = true, -- Bestial Wrath [25077] = true, -- Cobra Reflexes [23099] = true, -- Dash (Pet) [19263] = true, -- Deterrence [23145] = true, -- Dive (Pet) [1002] = true, -- Eyes of the Beast -- [1539] = true, -- Feed Pet Effect [5384] = true, -- Feign Death -- [34456] = true, -- Ferocious Inspiration [19615] = true, -- Frenzy Effect [24604] = true, -- Furious Howl (Wolf) [34833] = true, -- Master Tactician [136] = true, -- Mend Pet -- [24450] = true, -- Prowl (Cat) [3045] = true, -- Rapid Fire [35098] = true, -- Rapid Killing [26064] = true, -- Shell Shield (Turtle) -- [19579] = true, -- Spirit Bond -- [1515] = true, -- Tame Beast [34471] = true, -- The Beast Within -- [1494] = true, -- Track Beasts -- [19878] = true, -- Track Demons -- [19879] = true, -- Track Dragonkin -- [19880] = true, -- Track Elementals -- [19882] = true, -- Track Giants -- [19885] = true, -- Track Hidden -- [19883] = true, -- Track Humanoids -- [19884] = true, -- Track Undead -- [19506] = true, -- Trueshot Aura [35346] = true, -- Warp (Pet) -- Mage -- [12536] = true, -- Arcane Concentration (Clearcasting) [12042] = true, -- Arcane Power [31643] = true, -- Blazing Speed [28682] = true, -- Combustion [543] = true, -- Fire Ward [6143] = true, -- Frost Ward [11426] = true, -- Ice Barrier [11958] = true, -- Ice Block [12472] = true, -- Icy Veins [47000] = true, -- Improved Blink -- [66] = true, -- Invisibility [1463] = true, -- Mana Shield [130] = true, -- Slow Fall [12043] = true, -- Presence of Mind -- Paladin [31884] = true, -- Avenging Wrath [1044] = true, -- Blessing of Freedom [1022] = true, -- Blessing of Protection [6940] = true, -- Blessing of Sacrifice -- [19746] = true, -- Concentration Aura -- [32223] = true, -- Crusader Aura -- [465] = true, -- Devotion Aura [20216] = true, -- Divine Favor [31842] = true, -- Divine Illumination -- [19752] = true, -- Divine Intervention [498] = true, -- Divine Protection [642] = true, -- Divine Shield -- [19891] = true, -- Fire Resistance Aura -- [19888] = true, -- Frost Resistance Aura [20925] = true, -- Holy Shield [20233] = true, -- Lay on Hands (Armor Bonus) -- [31834] = true, -- Light's Grace -- [20178] = true, -- Reckoning -- [20128] = true, -- Redoubt -- [7294] = true, -- Retribution Aura -- [20218] = true, -- Sanctity Aura [31892] = true, -- Seal of Blood [27170] = true, -- Seal of Command [20164] = true, -- Seal of Justice [20165] = true, -- Seal of Light [21084] = true, -- Seal of Righteousness [31801] = true, -- Seal of Vengeance [20166] = true, -- Seal of Wisdom [21082] = true, -- Seal of the Crusader -- [5502] = true, -- Sense Undead -- [19876] = true, -- Shadow Resistance Aura [20050] = true, -- Vengeance -- Priest [552] = true, -- Abolish Disease [27813] = true, -- Blessed Recovery [33143] = true, -- Blessed Resilience [2651] = true, -- Elune's Grace -- [586] = true, -- Fade [6346] = true, -- Fear Ward [13896] = true, -- Feedback -- [45237] = true, -- Focused Will -- [34754] = true, -- Holy Concentration (Clearcasting) [588] = true, -- Inner Fire [14751] = true, -- Inner Focus [14893] = true, -- Inspiration [1706] = true, -- Levitate [7001] = true, -- Lightwell Renew -- [14743] = true, -- Martyrdom (Focused Casting) [10060] = true, -- Power Infusion [33206] = true, -- Pain Suppression [17] = true, -- Power Word: Shield [41635] = true, -- Prayer of Mending [139] = true, -- Renew -- [15473] = true, -- Shadowform [18137] = true, -- Shadowguard [27827] = true, -- Spirit of Redemption [15271] = true, -- Spirit Tap -- [33150] = true, -- Surge of Light [32548] = true, -- Symbol of Hope [2652] = true, -- Touch of Weakness -- [15290] = true, -- Vampiric Embrace -- [34919] = true, -- Vampiric Touch -- Rogue [13750] = true, -- Adrenaline Rush [13877] = true, -- Blade Flurry [31224] = true, -- Cloak of Shadows [14177] = true, -- Cold Blood [5277] = true, -- Evasion [31234] = true, -- Find Weakness [14278] = true, -- Ghostly Strike [5171] = true, -- Slice and Dice [2983] = true, -- Sprint -- [1784] = true, -- Stealth -- [31621] = true, -- Stealth (Vanish) [14143] = true, -- Remorseless Attacks [36563] = true, -- Shadowstep -- Shaman [2825] = true, -- Bloodlust [974] = true, -- Earth Shield [30165] = true, -- Elemental Devastation -- [16246] = true, -- Elemental Focus (Clearcasting) [16166] = true, -- Elemental Mastery -- [29063] = true, -- Eye of the Storm (Focused Casting) -- [8185] = true, -- Fire Resistance Totem [16257] = true, -- Flurry -- [8182] = true, -- Frost Resistance Totem -- [2645] = true, -- Ghost Wolf -- [8836] = true, -- Grace of Air [8178] = true, -- Grounding Totem Effect -- [5672] = true, -- Healing Stream [29203] = true, -- Healing Way [32182] = true, -- Heroism [324] = true, -- Lightning Shield -- [5677] = true, -- Mana Spring Totem [16191] = true, -- Mana Tide Totem [16188] = true, -- Nature's Swiftness -- [10596] = true, -- Nature Resistance Totem -- [6495] = true, -- Sentry Totem -- [43339] = true, -- Shamanistic Focus (Focused) [30823] = true, -- Shamanistic Rage -- [8072] = true, -- Stoneskin Totem -- [8076] = true, -- Strength of Earth -- [30708] = true, -- Totem of Wrath [30803] = true, -- Unleashed Rage [24398] = true, -- Water Shield -- [15108] = true, -- Windwall Totem -- [2895] = true, -- Wrath of Air Totem -- Warlock [18288] = true, -- Amplify Curse [34936] = true, -- Backlash -- [6307] = true, -- Blood Pact (Imp) [17767] = true, -- Consume Shadows (Voidwalker) [126] = true, -- Eye of Kilrogg [2947] = true, -- Fire Shield (Imp) [755] = true, -- Health Funnel [1949] = true, -- Hellfire -- [7870] = true, -- Lesser Invisibility (Succubus) -- [23759] = true, -- Master Demonologist (Imp - Reduced Threat) -- [23760] = true, -- Master Demonologist (Voidwalker - Reduced Physical Taken) -- [23761] = true, -- Master Demonologist (Succubus - Increased Damage) -- [23762] = true, -- Master Demonologist (Felhunter - Increased Resistance) -- [35702] = true, -- Master Demonologist (Felguard - Increased Damage/Resistance) [30300] = true, -- Nether Protection -- [19480] = true, -- Paranoia (Felhunter) -- [4511] = true, -- Phase Shift (Imp) [7812] = true, -- Sacrifice (Voidwalker) -- [5500] = true, -- Sense Demons [17941] = true, -- Shadow Trance [6229] = true, -- Shadow Ward [20707] = true, -- Soulstone Resurrection [25228] = true, -- Soul Link [19478] = true, -- Tainted Blood (Felhunter) -- Warrior [6673] = true, -- Battle Shout [18499] = true, -- Berserker Rage [29131] = true, -- Bloodrage [23885] = true, -- Bloodthirst [16488] = true, -- Blood Craze [469] = true, -- Commanding Shout [12292] = true, -- Death Wish [12880] = true, -- Enrage [12966] = true, -- Flurry [3411] = true, -- Intervene [12975] = true, -- Last Stand -- [29801] = true, -- Rampage (Base) [30029] = true, -- Rampage (Stack) [1719] = true, -- Recklessness [20230] = true, -- Retaliation [29841] = true, -- Second Wind [871] = true, -- Shield Wall [23920] = true, -- Spell Reflection [12328] = true, -- Sweeping Strikes -- Racial [20554] = true, -- Berserking (Mana) -- [26296] = true, -- Berserking (Rage) -- [26297] = true, -- Berserking (Energy) -- [20572] = true, -- Blood Fury (Physical) [33697] = true, -- Blood Fury (Both) -- [33702] = true, -- Blood Fury (Spell) -- [2481] = true, -- Find Treasure [28880] = true, -- Gift of the Naaru [20600] = true, -- Perception -- [20580] = true, -- Shadowmeld [20594] = true, -- Stoneform [7744] = true, -- Will of the Forsaken }
UIObjectFactory = class('UIObjectFactory') local _nameToType = { [ObjectType.Image] = GImage, [ObjectType.MovieClip] = GMovieClip, [ObjectType.Graph] = GGraph, [ObjectType.Group] = GGroup, [ObjectType.Loader] = GLoader, [ObjectType.Text] = GTextField, [ObjectType.RichText] = GRichTextField, [ObjectType.InputText] = GTextInput, [ObjectType.Component] = GComponent, [ObjectType.List] = GList, [ObjectType.Label] = GLabel, [ObjectType.Button] = GButton, [ObjectType.ComboBox] = GComboBox, [ObjectType.ProgressBar] = GProgressBar, [ObjectType.Slider] = GSlider, [ObjectType.ScrollBar] = GScrollBar } local _extensions = {} function UIObjectFactory.setExtension(url, type) assert(url~=nil and string.len(url)>0, "invalid url") local pi = UIPackage.getItemByURL(url) if pi then pi.extension = type end _extensions[url] = type end function UIObjectFactory.resolveExtension(item) local e = _extensions["ui://"..item.owner.id..item.id] if e==nil then e = _extensions["ui://"..item.owner.name..'/'..item.name] end item.extension = e end function UIObjectFactory.newObject(item) if item.extension then return item.extension.new() else return UIObjectFactory.newObject2(item.objectType) end end function UIObjectFactory.newObject2(objectType) return _nameToType[objectType].new() end
----------------------------------------------------------------------------- -- Name: ticpp.lua -- Purpose: TinyXML project script. -- Author: RJP Computing <rjpcomputing@gmail.com> -- Modified by: Andrea Zanellato zanellato.andrea@gmail.com -- Created: 2008/21/01 -- Copyright: (c) 2009 RJP Computing -- Licence: GNU General Public License Version 2 ----------------------------------------------------------------------------- project "TiCPP" kind "StaticLib" targetname "ticpp" targetdir "../../sdk/lib" files {"../../sdk/tinyxml/*.cpp", "../../sdk/tinyxml/*.h"} excludes {"xmltest.cpp"} defines {"TIXML_USE_TICPP"} if wxArchitecture then buildoptions {"-arch " .. wxArchitecture} end configuration "not windows" buildoptions {"-fPIC"} configuration "vs*" defines {"_CRT_SECURE_NO_DEPRECATE"} configuration "vs2008 or vs2010" -- multi-process building flags ("NoMinimalRebuild") buildoptions ("/MP") configuration "Debug" targetsuffix "d"
SelectListDialogValue = SelectListDialogValue or class(SelectListDialog) SelectListDialogValue.type_name = "SelectListDialogValue" function SelectListDialogValue:init(params, menu) if self.type_name == SelectListDialogValue.type_name then params = params and clone(params) or {} end self.super.init(self, table.merge(params, {align_method = "grid"}), menu) end function SelectListDialogValue:ItemsCount() return #self._list_items_menu:Items() end function SelectListDialogValue:ShowItem(t, selected) if not selected and (self._single_select or not self._allow_multi_insert) and self._list_menu:GetItem(t) then return false end if self:SearchCheck(t) then if not self._limit or self:ItemsCount() <= 250 then return true end end return false end function SelectListDialogValue:MakeListItems(params) MenuUtils:new(self, self._list_menu) self._list_menu:ClearItems() self._tbl.values_name = self._tbl.values_name or params and params.values_name self._tbl.combo_items_func = self._tbl.combo_items_func or params and params.combo_items_func self._tbl.values_list_width = self._tbl.values_list_width or params and params.values_list_width or 200 self._list_items_menu = self:DivGroup("Select or Deselect", {w = self._list_menu:ItemsWidth() - (self._tbl.values_name and self._tbl.values_list_width or 0), offset = 0, auto_align = false}) if self._tbl.values_name then self._values_list_menu = self:DivGroup(self._tbl.values_name, {w = self._tbl.values_list_width, offset = 0, auto_align = false}) end self.super.MakeListItems(self, params) end function SelectListDialogValue:ValueClbk(value, menu, item) local selected = item.SelectedItem and item:SelectedItem() value.value = selected and type(selected) == "table" and selected.value or selected or item:Value() end function SelectListDialogValue:ToggleClbk(...) SelectListDialogValue.super.ToggleClbk(self, ...) if self._allow_multi_insert and not self._single_select then self:MakeListItems() end end function SelectListDialogValue:ToggleItem(name, selected, value) local opt = {group = self._list_items_menu, offset = 4} local item if self._single_select then item = self:Toggle(name, callback(self, self, "ToggleClbk", value), selected, opt) else if selected then opt.value = false opt.foreground = Color.green opt.foreground_highlight = false opt.auto_foreground = false opt.can_be_ticked = false item = self:Button("- "..name, callback(self, self, "ToggleClbk", value), opt) else opt.value = true opt.foreground_highlight = false opt.auto_foreground = false opt.can_be_unticked = false item = self:Button("+ "..name, callback(self, self, "ToggleClbk", value), opt) end end opt = {control_slice = 1, group = self._values_list_menu, offset = 4, color = false} local v = selected and value.value or nil if self._tbl.values_name then if tonumber(v) then self:NumberBox("", callback(self, self, "ValueClbk", value), v, opt) elseif type(v) == "boolean" then self:Toggle("", callback(self, self, "ValueClbk", value), v, opt) elseif v then if self._tbl.combo_items_func then local items = self._tbl.combo_items_func(name, value) self:ComboBox("", callback(self, self, "ValueClbk", value), items, table.get_key(items, v), opt) else self:TextBox("", callback(self, self, "ValueClbk", value), v, opt) end else self:Divider("...", opt) end end table.insert(self._visible_items, item) end
RegisterServerEvent('setupgangcash') AddEventHandler('setupgangcash', function(amount) local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) if (tonumber(user:getBalance()) >= tonumber(amount)) then user:removeMoney(tonumber(amount)) else TriggerClientEvent('DoLongHudText', src, "Quit wasting my time and come back when you have the shit.", 1) end end) RegisterServerEvent('setupgangdb') AddEventHandler("setupgangdb", function(groupname) local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() local gang = groupname TriggerClientEvent('DoLongHudText', src, "The Group ".. groupname .." has been started!", 1) exports.ghmattimysql:execute('INSERT INTO gangs (cid, gang_name, reputation, leader, ingang, grove, covenant, brouge, forum, jamestown, mirrorpark, fudge, vespucci, cougar, harmony) VALUES (@cid, @gang_name, @reputation, @leader, @ingang, @grove, @covenant, @brouge, @forum, @jamestown, @mirrorpark, @fudge, @vespucci, @cougar, @harmony)', { ['@cid'] = char.id, ['@gang_name'] = gang, ['@reputation'] = "0", ['@leader'] = "1", ['@ingang'] = "1", ['@grove'] = "0", ['@covenant'] = "0", ['@brouge'] = "0", ['@forum'] = "0", ['@jamestown'] = "0", ['@mirrorpark'] = "0", ['@fudge'] = "0", ['@vespucci'] = "0", ['@cougar'] = "0", ['@harmony'] = "0", },function(data) TriggerClientEvent("gang:approved", src, true) TriggerClientEvent("gang:leader", src, true) end) end) RegisterServerEvent("npc-territories:approvedgang") AddEventHandler("npc-territories:approvedgang", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `ingang` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:approved", src, true) end end) end) RegisterServerEvent("npc-territories:leader") AddEventHandler("npc-territories:leader", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `leader` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:leader", src, true) end end) end) RegisterServerEvent("npc-territories:grove") AddEventHandler("npc-territories:grove", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `grove` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettinggrove", src, true) end end) end) RegisterServerEvent("npc-territories:covenant") AddEventHandler("npc-territories:covenant", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `covenant` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingcov", src, true) end end) end) RegisterServerEvent("npc-territories:brouge") AddEventHandler("npc-territories:brouge", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `brouge` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingbrouge", src, true) end end) end) RegisterServerEvent("npc-territories:forum") AddEventHandler("npc-territories:forum", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `forum` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingforum", src, true) end end) end) RegisterServerEvent("npc-territories:jamestown") AddEventHandler("npc-territories:jamestown", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `jamestown` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingjamestown", src, true) end end) end) RegisterServerEvent("npc-territories:mirrorpark") AddEventHandler("npc-territories:mirrorpark", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `mirrorpark` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingmirror", src, true) end end) end) RegisterServerEvent("npc-territories:fudge") AddEventHandler("npc-territories:fudge", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `fudge` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingfudge", src, true) end end) end) RegisterServerEvent("npc-territories:vespucci") AddEventHandler("npc-territories:vespucci", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `vespucci` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingvespucci", src, true) end end) end) RegisterServerEvent("npc-territories:cougar") AddEventHandler("npc-territories:cougar", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `cougar` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingcougar", src, true) end end) end) RegisterServerEvent("npc-territories:harmony") AddEventHandler("npc-territories:harmony", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local character = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid`= ? AND `harmony` = ?', {character.id, "1"}, function(data) if data[1] then TriggerClientEvent("gang:targettingharmony", src, true) end end) end) RegisterServerEvent('gangs:invmembers') AddEventHandler("gangs:invmembers", function(TargetID) local src = source local target = tonumber(TargetID) local user = exports["npc-core"]:getModule("Player"):GetUser(target) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT gang_name,reputation FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) if result[1].gang_name or result[1].reputation then print(result[1].gang_name) print(result[1].reputation) exports.ghmattimysql:execute("UPDATE characters SET `ingang` = @ingang WHERE `id` = @id", { ['ingang'] = "1", ['id'] = target}) exports.ghmattimysql:execute('INSERT INTO gangs (cid, gang_name, reputation, leader, ingang, grove, covenant, brouge, forum, jamestown, mirrorpark, fudge, vespucci, cougar, harmony) VALUES (@cid, @gang_name, @reputation, @leader, @ingang, @grove, @covenant, @brouge, @forum, @jamestown, @mirrorpark, @fudge, @vespucci, @cougar, @harmony)', { ['@cid'] = target, ['@gang_name'] = result[1].gang_name, ['@reputation'] = result[1].reputation, ['@leader'] = "1", ['@ingang'] = "1", ['@grove'] = "0", ['@covenant'] = "0", ['@brouge'] = "0", ['@forum'] = "0", ['@jamestown'] = "0", ['@mirrorpark'] = "0", ['@fudge'] = "0", ['@vespucci'] = "0", ['@cougar'] = "0", ['@harmony'] = "0", },function(data) TriggerClientEvent("gang:approved", target, true) TriggerClientEvent('DoLongHudText', src, "Invited CID ".. target .." To The "..result[1].gang_name.."!", 1) end) end end) end) RegisterServerEvent('gangs:removemembers') AddEventHandler("gangs:removemembers", function(TargetID) local src = source local target = tonumber(TargetID) local user = exports["npc-core"]:getModule("Player"):GetUser(target) exports.ghmattimysql:execute('DELETE FROM gangs WHERE `cid`= ?', {target}) TriggerClientEvent("gang:approved", target, false) TriggerClientEvent('DoLongHudText', src, "Removed Player ".. target .." From The Group!", 1) end) function updatePlayerInfo(source) local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM `gangs` WHERE `cid` = @cid', {['@cid'] = char.id}, function(rep) if ( rep and rep[1] ) then TriggerClientEvent('territories:getRep', src, rep[1].reputation) end end) end RegisterServerEvent("npc-territories:addrep") AddEventHandler("npc-territories:addrep", function(source, amount) local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(rep) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `reputation` = @reputation WHERE `gang_name` = @gang_name', { ['@reputation'] = (rep[1].reputation + amount), ['@gang_name'] = result[1].gang_name }, function () updatePlayerInfo(source) end) end) end) end) RegisterServerEvent("territories:getRep") AddEventHandler("territories:getRep", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute("SELECT reputation FROM gangs WHERE gang_name = @gang_name", {['gang_name'] = result[1].gang_name}, function(result) if result[1].reputation then local rep = json.decode(result[1].reputation) TriggerClientEvent("mt:missiontext", src, "Your Groups Reputation Is ".. rep, 2500) end end) end) end) RegisterServerEvent("targetgrove") AddEventHandler("targetgrove", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `grove` = @grove WHERE `gang_name` = @gang_name', { ['@grove'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetcovenant") AddEventHandler("targetcovenant", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `covenant` = @covenant WHERE `gang_name` = @gang_name', { ['@covenant'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetbrouge") AddEventHandler("targetbrouge", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `brouge` = @brouge WHERE `gang_name` = @gang_name', { ['@brouge'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetforum") AddEventHandler("targetforum", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `forum` = @forum WHERE `gang_name` = @gang_name', { ['@forum'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetjamestown") AddEventHandler("targetjamestown", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `jamestown` = @jamestown WHERE `gang_name` = @gang_name', { ['@jamestown'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetmirror") AddEventHandler("targetmirror", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `mirrorpark` = @mirrorpark WHERE `gang_name` = @gang_name', { ['@mirrorpark'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetfudge") AddEventHandler("targetfudge", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `fudge` = @fudge WHERE `gang_name` = @gang_name', { ['@fudge'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetvespucci") AddEventHandler("targetvespucci", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `vespucci` = @vespucci WHERE `gang_name` = @gang_name', { ['@vespucci'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetcougar") AddEventHandler("targetcougar", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `cougar` = @cougar WHERE `gang_name` = @gang_name', { ['@cougar'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end) RegisterServerEvent("targetharmony") AddEventHandler("targetharmony", function() local src = source local user = exports["npc-core"]:getModule("Player"):GetUser(src) local char = user:getCurrentCharacter() exports.ghmattimysql:execute('SELECT * FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result2) exports.ghmattimysql:execute('SELECT gang_name FROM gangs WHERE `cid` = @cid', { ['@cid'] = char.id }, function(result) exports.ghmattimysql:execute('UPDATE `gangs` SET `harmony` = @harmony WHERE `gang_name` = @gang_name', { ['@harmony'] = "1", ['@gang_name'] = result[1].gang_name }, function () end) end) end) end)
function SCHEMA:HUDPaint() /* if (LocalPlayer():isCombine() and !IsValid(nut.gui.char)) then if (!self.overlay) then self.overlay = Material("effects/combine_binocoverlay") self.overlay:SetFloat("$alpha", "0.3") self.overlay:Recompute() end surface.SetDrawColor(255, 255, 255) surface.SetMaterial(self.overlay) surface.DrawTexturedRect(0, 0, ScrW(), ScrH()) local panel = nut.gui.combine if (IsValid(panel)) then local x, y = panel:GetPos() local w, h = panel:GetSize() local color = Color(255, 255, 255, panel:GetAlpha()) for i = 1, #SCHEMA.displays do local data = SCHEMA.displays[i] if (data) then local y2 = y + (i * 22) if ((i * 22 + 24) > h) then table.remove(self.displays, 1) end surface.SetDrawColor(data.color.r, data.color.g, data.color.b, panel:GetAlpha() * (panel.mult or 0.2)) surface.DrawRect(x, y2, w, 22) if (#data.realText != #data.text) then data.i = (data.i or 0) + 1 data.realText = data.text:sub(1, data.i) end draw.SimpleText(data.realText, "BudgetLabel", x + 8, y2 + 12, color, 0, 1) end end end end */ end function SCHEMA:OnChatReceived(client, chatType, text, anonymous) /*local class = nut.chat.classes[chatType] if (client:getChar():hasFlags("V") and class and class.filter == "ic") then return "<:: "..text.." ::>" end*/ end local color = {} color["$pp_colour_addr"] = 0 color["$pp_colour_addg"] = 0 color["$pp_colour_addb"] = 0 color["$pp_colour_brightness"] = -0.05 color["$pp_colour_contrast"] = 1 color["$pp_colour_colour"] = 0.65 color["$pp_colour_mulr"] = 0 color["$pp_colour_mulg"] = 0 color["$pp_colour_mulb"] = 0 function SCHEMA:RenderScreenspaceEffects() DrawColorModify(color) end function SCHEMA:LoadIntro() -- If skip intro is on --if (true) then if (IsValid(nut.gui.char)) then vgui.Create("nutCharMenu") end --else --end end
-------------------------------------------------------------------------------- -- Function......... : fOffscreen -- Author........... : -- Description...... : -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- function ApplicationRuntimeOptions.fOffscreen ( bEnable, nScaleFactor, nAA ) -------------------------------------------------------------------------------- -- we need to turn off offscreen rendering, even if we just want to change the resolution application.setOption ( application.kOptionUseOffscreenRendering, 0 ) log.message ( "OPTIONS: Offscreen rendering OFF" ) if bEnable == true then if nScaleFactor <=0 then log.warning ( "OPTIONS: Invalid offscreen rendering scaling" ) return end if nAA ~=0 or nAA ~=2 or nAA ~=4 then log.warning ( "OPTIONS: Invalid offscreen AA factor" ) return end application.setOption ( application.kOptionOffscreenRenderingBlitToScreen, 0 ) -- a scaling factor of 0.5 would effectively half the resolution - good for performance local w = application.getCurrentUserViewportWidth ( ) * nScaleFactor local h = application.getCurrentUserViewportHeight ( ) * nScaleFactor -- set new OR screen resoulution application.setOption ( application.kOptionOffscreenRenderingBufferWidth, w ) application.setOption ( application.kOptionOffscreenRenderingBufferHeight, h ) log.message ( "OPTIONS: Offscreen rendering at "..w.."x"..h ) -- set offscreen AA -> only works in 2.0! -- application.setOption ( application.kOptionOffscreenRenderingAntialiasingSampleCount, nAA ) -- re-enable OR application.setOption ( application.kOptionUseOffscreenRendering, 1 ) application.setOption ( application.kOptionOffscreenRenderingBlitToScreen, 1 ) log.message ( "OPTIONS: Offscreen rendering ON" ) end -------------------------------------------------------------------------------- end --------------------------------------------------------------------------------
require("firecast.lua"); local __o_rrpgObjs = require("rrpgObjs.lua"); require("rrpgGUI.lua"); require("rrpgDialogs.lua"); require("rrpgLFM.lua"); require("ndb.lua"); require("locale.lua"); local __o_Utils = require("utils.lua"); local function constructNew_frmHITOPOKEPTAOLD() local obj = GUI.fromHandle(_obj_newObject("form")); local self = obj; local sheet = nil; rawset(obj, "_oldSetNodeObjectFunction", rawget(obj, "setNodeObject")); function obj:setNodeObject(nodeObject) sheet = nodeObject; self.sheet = nodeObject; self:_oldSetNodeObjectFunction(nodeObject); end; function obj:setNodeDatabase(nodeObject) self:setNodeObject(nodeObject); end; _gui_assignInitialParentForForm(obj.handle); obj:beginUpdate(); obj:setFormType("sheetTemplate"); obj:setDataType("HITO_PLAYER_POKEPTAOLD"); obj:setTitle("Hitoshura - Pokemon PTA (Antigo)"); obj:setName("frmHITOPOKEPTAOLD"); obj:setTheme("dark"); obj:setPadding({left=4, top=4, right=4, bottom=4}); obj.scrollBox1 = GUI.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox1:setParent(obj); obj.scrollBox1:setAlign("client"); obj.scrollBox1:setName("scrollBox1"); obj.tabControl1 = GUI.fromHandle(_obj_newObject("tabControl")); obj.tabControl1:setParent(obj.scrollBox1); obj.tabControl1:setLeft(20); obj.tabControl1:setTop(20); obj.tabControl1:setHeight(650); obj.tabControl1:setWidth(1100); obj.tabControl1:setName("tabControl1"); obj.tab1 = GUI.fromHandle(_obj_newObject("tab")); obj.tab1:setParent(obj.tabControl1); obj.tab1:setTitle("Geral"); obj.tab1:setName("tab1"); obj.frmGeral = GUI.fromHandle(_obj_newObject("form")); obj.frmGeral:setParent(obj.tab1); obj.frmGeral:setName("frmGeral"); obj.frmGeral:setAlign("client"); obj.frmGeral:setTheme("dark"); obj.frmGeral:setMargins({top=1}); obj.layout1 = GUI.fromHandle(_obj_newObject("layout")); obj.layout1:setParent(obj.frmGeral); obj.layout1:setLeft(000); obj.layout1:setTop(000); obj.layout1:setHeight(650); obj.layout1:setWidth(1100); obj.layout1:setName("layout1"); obj.image1 = GUI.fromHandle(_obj_newObject("image")); obj.image1:setParent(obj.layout1); obj.image1:setLeft(000); obj.image1:setTop(000); obj.image1:setHeight(650); obj.image1:setWidth(1100); obj.image1:setSRC("/img/Pokeball.jpg"); obj.image1:setStyle("autoFit"); obj.image1:setName("image1"); obj.layout2 = GUI.fromHandle(_obj_newObject("layout")); obj.layout2:setParent(obj.frmGeral); obj.layout2:setLeft(10); obj.layout2:setTop(010); obj.layout2:setHeight(175); obj.layout2:setWidth(300); obj.layout2:setName("layout2"); obj.label1 = GUI.fromHandle(_obj_newObject("label")); obj.label1:setParent(obj.layout2); obj.label1:setLeft(000); obj.label1:setTop(000); obj.label1:setHeight(20); obj.label1:setWidth(110); obj.label1:setText("Personagem"); obj.label1:setAutoSize(true); lfm_setPropAsString(obj.label1, "fontStyle", "bold"); obj.label1:setName("label1"); obj.edit1 = GUI.fromHandle(_obj_newObject("edit")); obj.edit1:setParent(obj.layout2); obj.edit1:setLeft(115); obj.edit1:setTop(000); obj.edit1:setHeight(20); obj.edit1:setWidth(170); obj.edit1:setField("basNameP"); obj.edit1:setHorzTextAlign("center"); obj.edit1:setName("edit1"); obj.label2 = GUI.fromHandle(_obj_newObject("label")); obj.label2:setParent(obj.layout2); obj.label2:setLeft(000); obj.label2:setTop(025); obj.label2:setHeight(20); obj.label2:setWidth(110); obj.label2:setText("Gênero"); obj.label2:setAutoSize(true); lfm_setPropAsString(obj.label2, "fontStyle", "bold"); obj.label2:setName("label2"); obj.edit2 = GUI.fromHandle(_obj_newObject("edit")); obj.edit2:setParent(obj.layout2); obj.edit2:setLeft(115); obj.edit2:setTop(025); obj.edit2:setHeight(20); obj.edit2:setWidth(170); obj.edit2:setField("basGene"); obj.edit2:setHorzTextAlign("center"); obj.edit2:setName("edit2"); obj.label3 = GUI.fromHandle(_obj_newObject("label")); obj.label3:setParent(obj.layout2); obj.label3:setLeft(000); obj.label3:setTop(050); obj.label3:setHeight(20); obj.label3:setWidth(110); obj.label3:setText("Altura"); obj.label3:setAutoSize(true); lfm_setPropAsString(obj.label3, "fontStyle", "bold"); obj.label3:setName("label3"); obj.edit3 = GUI.fromHandle(_obj_newObject("edit")); obj.edit3:setParent(obj.layout2); obj.edit3:setLeft(115); obj.edit3:setTop(050); obj.edit3:setHeight(20); obj.edit3:setWidth(170); obj.edit3:setField("basAltu"); obj.edit3:setHorzTextAlign("center"); obj.edit3:setName("edit3"); obj.label4 = GUI.fromHandle(_obj_newObject("label")); obj.label4:setParent(obj.layout2); obj.label4:setLeft(000); obj.label4:setTop(075); obj.label4:setHeight(20); obj.label4:setWidth(110); obj.label4:setText("Região"); obj.label4:setAutoSize(true); lfm_setPropAsString(obj.label4, "fontStyle", "bold"); obj.label4:setName("label4"); obj.edit4 = GUI.fromHandle(_obj_newObject("edit")); obj.edit4:setParent(obj.layout2); obj.edit4:setLeft(115); obj.edit4:setTop(075); obj.edit4:setHeight(20); obj.edit4:setWidth(170); obj.edit4:setField("basRegi"); obj.edit4:setHorzTextAlign("center"); obj.edit4:setName("edit4"); obj.label5 = GUI.fromHandle(_obj_newObject("label")); obj.label5:setParent(obj.layout2); obj.label5:setLeft(000); obj.label5:setTop(100); obj.label5:setHeight(20); obj.label5:setWidth(110); obj.label5:setText("Dinheiro"); obj.label5:setAutoSize(true); lfm_setPropAsString(obj.label5, "fontStyle", "bold"); obj.label5:setName("label5"); obj.edit5 = GUI.fromHandle(_obj_newObject("edit")); obj.edit5:setParent(obj.layout2); obj.edit5:setLeft(115); obj.edit5:setTop(100); obj.edit5:setHeight(20); obj.edit5:setWidth(170); obj.edit5:setField("basDinh"); obj.edit5:setHorzTextAlign("center"); obj.edit5:setName("edit5"); obj.label6 = GUI.fromHandle(_obj_newObject("label")); obj.label6:setParent(obj.layout2); obj.label6:setLeft(000); obj.label6:setTop(125); obj.label6:setHeight(20); obj.label6:setWidth(110); obj.label6:setText("Classe 2"); obj.label6:setAutoSize(true); lfm_setPropAsString(obj.label6, "fontStyle", "bold"); obj.label6:setName("label6"); obj.edit6 = GUI.fromHandle(_obj_newObject("edit")); obj.edit6:setParent(obj.layout2); obj.edit6:setLeft(115); obj.edit6:setTop(125); obj.edit6:setHeight(20); obj.edit6:setWidth(170); obj.edit6:setField("basCla2"); obj.edit6:setHorzTextAlign("center"); obj.edit6:setName("edit6"); obj.layout3 = GUI.fromHandle(_obj_newObject("layout")); obj.layout3:setParent(obj.frmGeral); obj.layout3:setLeft(305); obj.layout3:setTop(010); obj.layout3:setHeight(175); obj.layout3:setWidth(300); obj.layout3:setName("layout3"); obj.label7 = GUI.fromHandle(_obj_newObject("label")); obj.label7:setParent(obj.layout3); obj.label7:setLeft(000); obj.label7:setTop(000); obj.label7:setHeight(20); obj.label7:setWidth(110); obj.label7:setText("Jogador"); obj.label7:setAutoSize(true); lfm_setPropAsString(obj.label7, "fontStyle", "bold"); obj.label7:setName("label7"); obj.edit7 = GUI.fromHandle(_obj_newObject("edit")); obj.edit7:setParent(obj.layout3); obj.edit7:setLeft(115); obj.edit7:setTop(000); obj.edit7:setHeight(20); obj.edit7:setWidth(170); obj.edit7:setField("basNameJ"); obj.edit7:setHorzTextAlign("center"); obj.edit7:setName("edit7"); obj.label8 = GUI.fromHandle(_obj_newObject("label")); obj.label8:setParent(obj.layout3); obj.label8:setLeft(000); obj.label8:setTop(025); obj.label8:setHeight(20); obj.label8:setWidth(110); obj.label8:setText("Idade"); obj.label8:setAutoSize(true); lfm_setPropAsString(obj.label8, "fontStyle", "bold"); obj.label8:setName("label8"); obj.edit8 = GUI.fromHandle(_obj_newObject("edit")); obj.edit8:setParent(obj.layout3); obj.edit8:setLeft(115); obj.edit8:setTop(025); obj.edit8:setHeight(20); obj.edit8:setWidth(170); obj.edit8:setField("basIdad"); obj.edit8:setHorzTextAlign("center"); obj.edit8:setName("edit8"); obj.label9 = GUI.fromHandle(_obj_newObject("label")); obj.label9:setParent(obj.layout3); obj.label9:setLeft(000); obj.label9:setTop(050); obj.label9:setHeight(20); obj.label9:setWidth(110); obj.label9:setText("Peso"); obj.label9:setAutoSize(true); lfm_setPropAsString(obj.label9, "fontStyle", "bold"); obj.label9:setName("label9"); obj.edit9 = GUI.fromHandle(_obj_newObject("edit")); obj.edit9:setParent(obj.layout3); obj.edit9:setLeft(115); obj.edit9:setTop(050); obj.edit9:setHeight(20); obj.edit9:setWidth(170); obj.edit9:setField("basPeso"); obj.edit9:setHorzTextAlign("center"); obj.edit9:setName("edit9"); obj.label10 = GUI.fromHandle(_obj_newObject("label")); obj.label10:setParent(obj.layout3); obj.label10:setLeft(000); obj.label10:setTop(075); obj.label10:setHeight(20); obj.label10:setWidth(110); obj.label10:setText("Cidade Natal"); obj.label10:setAutoSize(true); lfm_setPropAsString(obj.label10, "fontStyle", "bold"); obj.label10:setName("label10"); obj.edit10 = GUI.fromHandle(_obj_newObject("edit")); obj.edit10:setParent(obj.layout3); obj.edit10:setLeft(115); obj.edit10:setTop(075); obj.edit10:setHeight(20); obj.edit10:setWidth(170); obj.edit10:setField("basCidN"); obj.edit10:setHorzTextAlign("center"); obj.edit10:setName("edit10"); obj.label11 = GUI.fromHandle(_obj_newObject("label")); obj.label11:setParent(obj.layout3); obj.label11:setLeft(000); obj.label11:setTop(100); obj.label11:setHeight(20); obj.label11:setWidth(110); obj.label11:setText("Classe 1"); obj.label11:setAutoSize(true); lfm_setPropAsString(obj.label11, "fontStyle", "bold"); obj.label11:setName("label11"); obj.edit11 = GUI.fromHandle(_obj_newObject("edit")); obj.edit11:setParent(obj.layout3); obj.edit11:setLeft(115); obj.edit11:setTop(100); obj.edit11:setHeight(20); obj.edit11:setWidth(170); obj.edit11:setField("basCla1"); obj.edit11:setHorzTextAlign("center"); obj.edit11:setName("edit11"); obj.label12 = GUI.fromHandle(_obj_newObject("label")); obj.label12:setParent(obj.layout3); obj.label12:setLeft(000); obj.label12:setTop(125); obj.label12:setHeight(20); obj.label12:setWidth(110); obj.label12:setText("Classe 3"); obj.label12:setAutoSize(true); lfm_setPropAsString(obj.label12, "fontStyle", "bold"); obj.label12:setName("label12"); obj.edit12 = GUI.fromHandle(_obj_newObject("edit")); obj.edit12:setParent(obj.layout3); obj.edit12:setLeft(115); obj.edit12:setTop(125); obj.edit12:setHeight(20); obj.edit12:setWidth(170); obj.edit12:setField("basCla3"); obj.edit12:setHorzTextAlign("center"); obj.edit12:setName("edit12"); obj.layout4 = GUI.fromHandle(_obj_newObject("layout")); obj.layout4:setParent(obj.frmGeral); obj.layout4:setLeft(620); obj.layout4:setTop(10); obj.layout4:setHeight(512); obj.layout4:setWidth(512); obj.layout4:setName("layout4"); obj.rectangle1 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle1:setParent(obj.layout4); obj.rectangle1:setLeft(000); obj.rectangle1:setTop(000); obj.rectangle1:setWidth(360); obj.rectangle1:setHeight(360); obj.rectangle1:setColor("Red"); obj.rectangle1:setStrokeColor("black"); obj.rectangle1:setStrokeSize(3); obj.rectangle1:setName("rectangle1"); obj.rectangle2 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle2:setParent(obj.layout4); obj.rectangle2:setLeft(005); obj.rectangle2:setTop(005); obj.rectangle2:setWidth(350); obj.rectangle2:setHeight(350); obj.rectangle2:setColor("Black"); obj.rectangle2:setStrokeColor("black"); obj.rectangle2:setStrokeSize(4); obj.rectangle2:setName("rectangle2"); obj.image2 = GUI.fromHandle(_obj_newObject("image")); obj.image2:setParent(obj.layout4); obj.image2:setLeft(005); obj.image2:setTop(005); obj.image2:setWidth(350); obj.image2:setHeight(350); obj.image2:setField("basPERS"); obj.image2:setEditable(true); obj.image2:setStyle("proportional"); obj.image2:setHint("Imagem do Personagem"); lfm_setPropAsString(obj.image2, "animate", "true"); obj.image2:setName("image2"); obj.layout5 = GUI.fromHandle(_obj_newObject("layout")); obj.layout5:setParent(obj.frmGeral); obj.layout5:setLeft(10); obj.layout5:setTop(200); obj.layout5:setHeight(320); obj.layout5:setWidth(420); obj.layout5:setName("layout5"); obj.label13 = GUI.fromHandle(_obj_newObject("label")); obj.label13:setParent(obj.layout5); obj.label13:setLeft(000); obj.label13:setTop(000); obj.label13:setHeight(20); obj.label13:setWidth(110); obj.label13:setText("Atributo"); obj.label13:setAutoSize(true); lfm_setPropAsString(obj.label13, "fontStyle", "bold"); obj.label13:setHorzTextAlign("center"); obj.label13:setName("label13"); obj.label14 = GUI.fromHandle(_obj_newObject("label")); obj.label14:setParent(obj.layout5); obj.label14:setLeft(115); obj.label14:setTop(000); obj.label14:setHeight(20); obj.label14:setWidth(30); obj.label14:setText("Base"); obj.label14:setHorzTextAlign("center"); obj.label14:setName("label14"); obj.label15 = GUI.fromHandle(_obj_newObject("label")); obj.label15:setParent(obj.layout5); obj.label15:setLeft(150); obj.label15:setTop(000); obj.label15:setHeight(20); obj.label15:setWidth(30); obj.label15:setText("Bôn."); obj.label15:setHorzTextAlign("center"); obj.label15:setName("label15"); obj.label16 = GUI.fromHandle(_obj_newObject("label")); obj.label16:setParent(obj.layout5); obj.label16:setLeft(185); obj.label16:setTop(000); obj.label16:setHeight(20); obj.label16:setWidth(30); obj.label16:setText("Tot."); obj.label16:setHorzTextAlign("center"); obj.label16:setName("label16"); obj.label17 = GUI.fromHandle(_obj_newObject("label")); obj.label17:setParent(obj.layout5); obj.label17:setLeft(220); obj.label17:setTop(000); obj.label17:setHeight(20); obj.label17:setWidth(30); obj.label17:setText("Mod."); obj.label17:setHorzTextAlign("center"); obj.label17:setName("label17"); obj.label18 = GUI.fromHandle(_obj_newObject("label")); obj.label18:setParent(obj.layout5); obj.label18:setLeft(000); obj.label18:setTop(025); obj.label18:setHeight(20); obj.label18:setWidth(110); obj.label18:setText("Força"); obj.label18:setAutoSize(true); lfm_setPropAsString(obj.label18, "fontStyle", "bold"); obj.label18:setName("label18"); obj.BotaoFOR = GUI.fromHandle(_obj_newObject("button")); obj.BotaoFOR:setParent(obj.layout5); obj.BotaoFOR:setLeft(000); obj.BotaoFOR:setTop(025); obj.BotaoFOR:setWidth(110); obj.BotaoFOR:setHeight(20); obj.BotaoFOR:setText("Força"); obj.BotaoFOR:setName("BotaoFOR"); obj.edit13 = GUI.fromHandle(_obj_newObject("edit")); obj.edit13:setParent(obj.layout5); obj.edit13:setLeft(115); obj.edit13:setTop(025); obj.edit13:setHeight(20); obj.edit13:setWidth(30); obj.edit13:setField("basFOR"); obj.edit13:setHorzTextAlign("center"); obj.edit13:setType("number"); obj.edit13:setName("edit13"); obj.edit14 = GUI.fromHandle(_obj_newObject("edit")); obj.edit14:setParent(obj.layout5); obj.edit14:setLeft(150); obj.edit14:setTop(025); obj.edit14:setHeight(20); obj.edit14:setWidth(30); obj.edit14:setField("bonFOR"); obj.edit14:setHorzTextAlign("center"); obj.edit14:setType("number"); obj.edit14:setName("edit14"); obj.edit15 = GUI.fromHandle(_obj_newObject("edit")); obj.edit15:setParent(obj.layout5); obj.edit15:setLeft(185); obj.edit15:setTop(025); obj.edit15:setHeight(20); obj.edit15:setWidth(30); obj.edit15:setField("totFOR"); obj.edit15:setHorzTextAlign("center"); obj.edit15:setEnabled(false); obj.edit15:setName("edit15"); obj.edit16 = GUI.fromHandle(_obj_newObject("edit")); obj.edit16:setParent(obj.layout5); obj.edit16:setLeft(220); obj.edit16:setTop(025); obj.edit16:setHeight(20); obj.edit16:setWidth(30); obj.edit16:setField("modFOR"); obj.edit16:setHorzTextAlign("center"); obj.edit16:setEnabled(false); obj.edit16:setName("edit16"); obj.dataLink1 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink1:setParent(obj.layout5); obj.dataLink1:setField("basFOR"); obj.dataLink1:setDefaultValue("6"); obj.dataLink1:setName("dataLink1"); obj.dataLink2 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink2:setParent(obj.layout5); obj.dataLink2:setField("bonFOR"); obj.dataLink2:setDefaultValue("0"); obj.dataLink2:setName("dataLink2"); obj.label19 = GUI.fromHandle(_obj_newObject("label")); obj.label19:setParent(obj.layout5); obj.label19:setLeft(000); obj.label19:setTop(050); obj.label19:setHeight(20); obj.label19:setWidth(110); obj.label19:setText("Constituição"); obj.label19:setAutoSize(true); lfm_setPropAsString(obj.label19, "fontStyle", "bold"); obj.label19:setName("label19"); obj.BotaoCON = GUI.fromHandle(_obj_newObject("button")); obj.BotaoCON:setParent(obj.layout5); obj.BotaoCON:setLeft(000); obj.BotaoCON:setTop(050); obj.BotaoCON:setWidth(110); obj.BotaoCON:setHeight(20); obj.BotaoCON:setText("Constituição"); obj.BotaoCON:setName("BotaoCON"); obj.edit17 = GUI.fromHandle(_obj_newObject("edit")); obj.edit17:setParent(obj.layout5); obj.edit17:setLeft(115); obj.edit17:setTop(050); obj.edit17:setHeight(20); obj.edit17:setWidth(30); obj.edit17:setField("basCON"); obj.edit17:setHorzTextAlign("center"); obj.edit17:setType("number"); obj.edit17:setName("edit17"); obj.edit18 = GUI.fromHandle(_obj_newObject("edit")); obj.edit18:setParent(obj.layout5); obj.edit18:setLeft(150); obj.edit18:setTop(050); obj.edit18:setHeight(20); obj.edit18:setWidth(30); obj.edit18:setField("bonCON"); obj.edit18:setHorzTextAlign("center"); obj.edit18:setType("number"); obj.edit18:setName("edit18"); obj.edit19 = GUI.fromHandle(_obj_newObject("edit")); obj.edit19:setParent(obj.layout5); obj.edit19:setLeft(185); obj.edit19:setTop(050); obj.edit19:setHeight(20); obj.edit19:setWidth(30); obj.edit19:setField("totCON"); obj.edit19:setHorzTextAlign("center"); obj.edit19:setEnabled(false); obj.edit19:setName("edit19"); obj.edit20 = GUI.fromHandle(_obj_newObject("edit")); obj.edit20:setParent(obj.layout5); obj.edit20:setLeft(220); obj.edit20:setTop(050); obj.edit20:setHeight(20); obj.edit20:setWidth(30); obj.edit20:setField("modCON"); obj.edit20:setHorzTextAlign("center"); obj.edit20:setEnabled(false); obj.edit20:setName("edit20"); obj.dataLink3 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink3:setParent(obj.layout5); obj.dataLink3:setField("basCON"); obj.dataLink3:setDefaultValue("6"); obj.dataLink3:setName("dataLink3"); obj.dataLink4 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink4:setParent(obj.layout5); obj.dataLink4:setField("bonCON"); obj.dataLink4:setDefaultValue("0"); obj.dataLink4:setName("dataLink4"); obj.label20 = GUI.fromHandle(_obj_newObject("label")); obj.label20:setParent(obj.layout5); obj.label20:setLeft(000); obj.label20:setTop(075); obj.label20:setHeight(20); obj.label20:setWidth(110); obj.label20:setText("Destreza"); obj.label20:setAutoSize(true); lfm_setPropAsString(obj.label20, "fontStyle", "bold"); obj.label20:setName("label20"); obj.BotaoDES = GUI.fromHandle(_obj_newObject("button")); obj.BotaoDES:setParent(obj.layout5); obj.BotaoDES:setLeft(000); obj.BotaoDES:setTop(075); obj.BotaoDES:setWidth(110); obj.BotaoDES:setHeight(20); obj.BotaoDES:setText("Destreza"); obj.BotaoDES:setName("BotaoDES"); obj.edit21 = GUI.fromHandle(_obj_newObject("edit")); obj.edit21:setParent(obj.layout5); obj.edit21:setLeft(115); obj.edit21:setTop(075); obj.edit21:setHeight(20); obj.edit21:setWidth(30); obj.edit21:setField("basDES"); obj.edit21:setHorzTextAlign("center"); obj.edit21:setType("number"); obj.edit21:setName("edit21"); obj.edit22 = GUI.fromHandle(_obj_newObject("edit")); obj.edit22:setParent(obj.layout5); obj.edit22:setLeft(150); obj.edit22:setTop(075); obj.edit22:setHeight(20); obj.edit22:setWidth(30); obj.edit22:setField("bonDES"); obj.edit22:setHorzTextAlign("center"); obj.edit22:setType("number"); obj.edit22:setName("edit22"); obj.edit23 = GUI.fromHandle(_obj_newObject("edit")); obj.edit23:setParent(obj.layout5); obj.edit23:setLeft(185); obj.edit23:setTop(075); obj.edit23:setHeight(20); obj.edit23:setWidth(30); obj.edit23:setField("totDES"); obj.edit23:setHorzTextAlign("center"); obj.edit23:setEnabled(false); obj.edit23:setName("edit23"); obj.edit24 = GUI.fromHandle(_obj_newObject("edit")); obj.edit24:setParent(obj.layout5); obj.edit24:setLeft(220); obj.edit24:setTop(075); obj.edit24:setHeight(20); obj.edit24:setWidth(30); obj.edit24:setField("modDES"); obj.edit24:setHorzTextAlign("center"); obj.edit24:setEnabled(false); obj.edit24:setName("edit24"); obj.dataLink5 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink5:setParent(obj.layout5); obj.dataLink5:setField("basDES"); obj.dataLink5:setDefaultValue("6"); obj.dataLink5:setName("dataLink5"); obj.dataLink6 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink6:setParent(obj.layout5); obj.dataLink6:setField("bonDES"); obj.dataLink6:setDefaultValue("0"); obj.dataLink6:setName("dataLink6"); obj.label21 = GUI.fromHandle(_obj_newObject("label")); obj.label21:setParent(obj.layout5); obj.label21:setLeft(000); obj.label21:setTop(100); obj.label21:setHeight(20); obj.label21:setWidth(110); obj.label21:setText("Inteligência"); obj.label21:setAutoSize(true); lfm_setPropAsString(obj.label21, "fontStyle", "bold"); obj.label21:setName("label21"); obj.BotaoINT = GUI.fromHandle(_obj_newObject("button")); obj.BotaoINT:setParent(obj.layout5); obj.BotaoINT:setLeft(000); obj.BotaoINT:setTop(100); obj.BotaoINT:setWidth(110); obj.BotaoINT:setHeight(20); obj.BotaoINT:setText("Inteligência"); obj.BotaoINT:setName("BotaoINT"); obj.edit25 = GUI.fromHandle(_obj_newObject("edit")); obj.edit25:setParent(obj.layout5); obj.edit25:setLeft(115); obj.edit25:setTop(100); obj.edit25:setHeight(20); obj.edit25:setWidth(30); obj.edit25:setField("basINT"); obj.edit25:setHorzTextAlign("center"); obj.edit25:setType("number"); obj.edit25:setName("edit25"); obj.edit26 = GUI.fromHandle(_obj_newObject("edit")); obj.edit26:setParent(obj.layout5); obj.edit26:setLeft(150); obj.edit26:setTop(100); obj.edit26:setHeight(20); obj.edit26:setWidth(30); obj.edit26:setField("bonINT"); obj.edit26:setHorzTextAlign("center"); obj.edit26:setType("number"); obj.edit26:setName("edit26"); obj.edit27 = GUI.fromHandle(_obj_newObject("edit")); obj.edit27:setParent(obj.layout5); obj.edit27:setLeft(185); obj.edit27:setTop(100); obj.edit27:setHeight(20); obj.edit27:setWidth(30); obj.edit27:setField("totINT"); obj.edit27:setHorzTextAlign("center"); obj.edit27:setEnabled(false); obj.edit27:setName("edit27"); obj.edit28 = GUI.fromHandle(_obj_newObject("edit")); obj.edit28:setParent(obj.layout5); obj.edit28:setLeft(220); obj.edit28:setTop(100); obj.edit28:setHeight(20); obj.edit28:setWidth(30); obj.edit28:setField("modINT"); obj.edit28:setHorzTextAlign("center"); obj.edit28:setEnabled(false); obj.edit28:setName("edit28"); obj.dataLink7 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink7:setParent(obj.layout5); obj.dataLink7:setField("basINT"); obj.dataLink7:setDefaultValue("6"); obj.dataLink7:setName("dataLink7"); obj.dataLink8 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink8:setParent(obj.layout5); obj.dataLink8:setField("bonINT"); obj.dataLink8:setDefaultValue("0"); obj.dataLink8:setName("dataLink8"); obj.label22 = GUI.fromHandle(_obj_newObject("label")); obj.label22:setParent(obj.layout5); obj.label22:setLeft(000); obj.label22:setTop(125); obj.label22:setHeight(20); obj.label22:setWidth(110); obj.label22:setText("Sabedoria"); obj.label22:setAutoSize(true); lfm_setPropAsString(obj.label22, "fontStyle", "bold"); obj.label22:setName("label22"); obj.BotaoSAB = GUI.fromHandle(_obj_newObject("button")); obj.BotaoSAB:setParent(obj.layout5); obj.BotaoSAB:setLeft(000); obj.BotaoSAB:setTop(125); obj.BotaoSAB:setWidth(110); obj.BotaoSAB:setHeight(20); obj.BotaoSAB:setText("Sabedoria"); obj.BotaoSAB:setName("BotaoSAB"); obj.edit29 = GUI.fromHandle(_obj_newObject("edit")); obj.edit29:setParent(obj.layout5); obj.edit29:setLeft(115); obj.edit29:setTop(125); obj.edit29:setHeight(20); obj.edit29:setWidth(30); obj.edit29:setField("basSAB"); obj.edit29:setHorzTextAlign("center"); obj.edit29:setType("number"); obj.edit29:setName("edit29"); obj.edit30 = GUI.fromHandle(_obj_newObject("edit")); obj.edit30:setParent(obj.layout5); obj.edit30:setLeft(150); obj.edit30:setTop(125); obj.edit30:setHeight(20); obj.edit30:setWidth(30); obj.edit30:setField("bonSAB"); obj.edit30:setHorzTextAlign("center"); obj.edit30:setType("number"); obj.edit30:setName("edit30"); obj.edit31 = GUI.fromHandle(_obj_newObject("edit")); obj.edit31:setParent(obj.layout5); obj.edit31:setLeft(185); obj.edit31:setTop(125); obj.edit31:setHeight(20); obj.edit31:setWidth(30); obj.edit31:setField("totSAB"); obj.edit31:setHorzTextAlign("center"); obj.edit31:setEnabled(false); obj.edit31:setName("edit31"); obj.edit32 = GUI.fromHandle(_obj_newObject("edit")); obj.edit32:setParent(obj.layout5); obj.edit32:setLeft(220); obj.edit32:setTop(125); obj.edit32:setHeight(20); obj.edit32:setWidth(30); obj.edit32:setField("modSAB"); obj.edit32:setHorzTextAlign("center"); obj.edit32:setEnabled(false); obj.edit32:setName("edit32"); obj.dataLink9 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink9:setParent(obj.layout5); obj.dataLink9:setField("basSAB"); obj.dataLink9:setDefaultValue("6"); obj.dataLink9:setName("dataLink9"); obj.dataLink10 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink10:setParent(obj.layout5); obj.dataLink10:setField("bonSAB"); obj.dataLink10:setDefaultValue("0"); obj.dataLink10:setName("dataLink10"); obj.label23 = GUI.fromHandle(_obj_newObject("label")); obj.label23:setParent(obj.layout5); obj.label23:setLeft(000); obj.label23:setTop(150); obj.label23:setHeight(20); obj.label23:setWidth(110); obj.label23:setText("Carisma"); obj.label23:setAutoSize(true); lfm_setPropAsString(obj.label23, "fontStyle", "bold"); obj.label23:setName("label23"); obj.BotaoCAR = GUI.fromHandle(_obj_newObject("button")); obj.BotaoCAR:setParent(obj.layout5); obj.BotaoCAR:setLeft(000); obj.BotaoCAR:setTop(150); obj.BotaoCAR:setWidth(110); obj.BotaoCAR:setHeight(20); obj.BotaoCAR:setText("Carisma"); obj.BotaoCAR:setName("BotaoCAR"); obj.edit33 = GUI.fromHandle(_obj_newObject("edit")); obj.edit33:setParent(obj.layout5); obj.edit33:setLeft(115); obj.edit33:setTop(150); obj.edit33:setHeight(20); obj.edit33:setWidth(30); obj.edit33:setField("basCAR"); obj.edit33:setHorzTextAlign("center"); obj.edit33:setType("number"); obj.edit33:setName("edit33"); obj.edit34 = GUI.fromHandle(_obj_newObject("edit")); obj.edit34:setParent(obj.layout5); obj.edit34:setLeft(150); obj.edit34:setTop(150); obj.edit34:setHeight(20); obj.edit34:setWidth(30); obj.edit34:setField("bonCAR"); obj.edit34:setHorzTextAlign("center"); obj.edit34:setType("number"); obj.edit34:setName("edit34"); obj.edit35 = GUI.fromHandle(_obj_newObject("edit")); obj.edit35:setParent(obj.layout5); obj.edit35:setLeft(185); obj.edit35:setTop(150); obj.edit35:setHeight(20); obj.edit35:setWidth(30); obj.edit35:setField("totCAR"); obj.edit35:setHorzTextAlign("center"); obj.edit35:setEnabled(false); obj.edit35:setName("edit35"); obj.edit36 = GUI.fromHandle(_obj_newObject("edit")); obj.edit36:setParent(obj.layout5); obj.edit36:setLeft(220); obj.edit36:setTop(150); obj.edit36:setHeight(20); obj.edit36:setWidth(30); obj.edit36:setField("modCAR"); obj.edit36:setHorzTextAlign("center"); obj.edit36:setEnabled(false); obj.edit36:setName("edit36"); obj.dataLink11 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink11:setParent(obj.layout5); obj.dataLink11:setField("basCAR"); obj.dataLink11:setDefaultValue("6"); obj.dataLink11:setName("dataLink11"); obj.dataLink12 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink12:setParent(obj.layout5); obj.dataLink12:setField("bonCAR"); obj.dataLink12:setDefaultValue("0"); obj.dataLink12:setName("dataLink12"); obj.layout6 = GUI.fromHandle(_obj_newObject("layout")); obj.layout6:setParent(obj.frmGeral); obj.layout6:setLeft(375); obj.layout6:setTop(200); obj.layout6:setHeight(320); obj.layout6:setWidth(420); obj.layout6:setName("layout6"); obj.label24 = GUI.fromHandle(_obj_newObject("label")); obj.label24:setParent(obj.layout6); obj.label24:setLeft(115); obj.label24:setTop(000); obj.label24:setHeight(20); obj.label24:setWidth(45); obj.label24:setText("Atual"); obj.label24:setAutoSize(true); obj.label24:setHorzTextAlign("center"); obj.label24:setName("label24"); obj.label25 = GUI.fromHandle(_obj_newObject("label")); obj.label25:setParent(obj.layout6); obj.label25:setLeft(165); obj.label25:setTop(000); obj.label25:setHeight(20); obj.label25:setWidth(45); obj.label25:setText("Max"); obj.label25:setAutoSize(true); obj.label25:setHorzTextAlign("center"); obj.label25:setName("label25"); obj.label26 = GUI.fromHandle(_obj_newObject("label")); obj.label26:setParent(obj.layout6); obj.label26:setLeft(000); obj.label26:setTop(25); obj.label26:setHeight(20); obj.label26:setWidth(100); obj.label26:setText("Pontos de Vida"); obj.label26:setAutoSize(true); lfm_setPropAsString(obj.label26, "fontStyle", "bold"); obj.label26:setName("label26"); obj.edit37 = GUI.fromHandle(_obj_newObject("edit")); obj.edit37:setParent(obj.layout6); obj.edit37:setLeft(115); obj.edit37:setTop(25); obj.edit37:setHeight(20); obj.edit37:setWidth(45); obj.edit37:setField("atuPV"); obj.edit37:setHorzTextAlign("center"); obj.edit37:setType("number"); obj.edit37:setName("edit37"); obj.edit38 = GUI.fromHandle(_obj_newObject("edit")); obj.edit38:setParent(obj.layout6); obj.edit38:setLeft(165); obj.edit38:setTop(25); obj.edit38:setHeight(20); obj.edit38:setWidth(45); obj.edit38:setField("maxPV"); obj.edit38:setHorzTextAlign("center"); obj.edit38:setHint("Máximo"); obj.edit38:setEnabled(false); obj.edit38:setType("number"); obj.edit38:setName("edit38"); obj.label27 = GUI.fromHandle(_obj_newObject("label")); obj.label27:setParent(obj.layout6); obj.label27:setLeft(000); obj.label27:setTop(50); obj.label27:setHeight(20); obj.label27:setWidth(100); obj.label27:setText("Nível"); obj.label27:setAutoSize(true); lfm_setPropAsString(obj.label27, "fontStyle", "bold"); obj.label27:setName("label27"); obj.edit39 = GUI.fromHandle(_obj_newObject("edit")); obj.edit39:setParent(obj.layout6); obj.edit39:setLeft(115); obj.edit39:setTop(50); obj.edit39:setHeight(20); obj.edit39:setWidth(45); obj.edit39:setField("atuNV"); obj.edit39:setHorzTextAlign("center"); obj.edit39:setType("number"); obj.edit39:setName("edit39"); obj.edit40 = GUI.fromHandle(_obj_newObject("edit")); obj.edit40:setParent(obj.layout6); obj.edit40:setLeft(165); obj.edit40:setTop(50); obj.edit40:setHeight(20); obj.edit40:setWidth(45); obj.edit40:setField("maxNV"); obj.edit40:setHorzTextAlign("center"); obj.edit40:setHint("Máximo"); obj.edit40:setEnabled(false); obj.edit40:setType("number"); obj.edit40:setName("edit40"); obj.label28 = GUI.fromHandle(_obj_newObject("label")); obj.label28:setParent(obj.layout6); obj.label28:setLeft(000); obj.label28:setTop(75); obj.label28:setHeight(20); obj.label28:setWidth(100); obj.label28:setText("Experiência"); obj.label28:setAutoSize(true); lfm_setPropAsString(obj.label28, "fontStyle", "bold"); obj.label28:setName("label28"); obj.edit41 = GUI.fromHandle(_obj_newObject("edit")); obj.edit41:setParent(obj.layout6); obj.edit41:setLeft(115); obj.edit41:setTop(75); obj.edit41:setHeight(20); obj.edit41:setWidth(45); obj.edit41:setField("atuEXP"); obj.edit41:setHorzTextAlign("center"); obj.edit41:setType("number"); obj.edit41:setName("edit41"); obj.edit42 = GUI.fromHandle(_obj_newObject("edit")); obj.edit42:setParent(obj.layout6); obj.edit42:setLeft(165); obj.edit42:setTop(75); obj.edit42:setHeight(20); obj.edit42:setWidth(45); obj.edit42:setField("maxEXP"); obj.edit42:setHorzTextAlign("center"); obj.edit42:setHint("Máximo"); obj.edit42:setEnabled(true); obj.edit42:setType("number"); obj.edit42:setName("edit42"); obj.dataLink13 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink13:setParent(obj.layout6); obj.dataLink13:setField("atuEXP"); obj.dataLink13:setDefaultValue("0"); obj.dataLink13:setName("dataLink13"); obj.dataLink14 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink14:setParent(obj.layout6); obj.dataLink14:setField("maxEXP"); obj.dataLink14:setDefaultValue("1000"); obj.dataLink14:setName("dataLink14"); obj.layout7 = GUI.fromHandle(_obj_newObject("layout")); obj.layout7:setParent(obj.frmGeral); obj.layout7:setLeft(375); obj.layout7:setTop(300); obj.layout7:setHeight(320); obj.layout7:setWidth(420); obj.layout7:setName("layout7"); obj.label29 = GUI.fromHandle(_obj_newObject("label")); obj.label29:setParent(obj.layout7); obj.label29:setLeft(000); obj.label29:setTop(000); obj.label29:setHeight(20); obj.label29:setWidth(110); obj.label29:setText("Capacidade"); obj.label29:setAutoSize(true); obj.label29:setName("label29"); obj.label30 = GUI.fromHandle(_obj_newObject("label")); obj.label30:setParent(obj.layout7); obj.label30:setLeft(115); obj.label30:setTop(000); obj.label30:setHeight(20); obj.label30:setWidth(30); obj.label30:setText("Tot."); obj.label30:setAutoSize(true); obj.label30:setHorzTextAlign("center"); obj.label30:setName("label30"); obj.label31 = GUI.fromHandle(_obj_newObject("label")); obj.label31:setParent(obj.layout7); obj.label31:setLeft(150); obj.label31:setTop(000); obj.label31:setHeight(20); obj.label31:setWidth(30); obj.label31:setText("Base"); obj.label31:setAutoSize(true); obj.label31:setHorzTextAlign("center"); obj.label31:setName("label31"); obj.label32 = GUI.fromHandle(_obj_newObject("label")); obj.label32:setParent(obj.layout7); obj.label32:setLeft(185); obj.label32:setTop(000); obj.label32:setHeight(20); obj.label32:setWidth(30); obj.label32:setText("Bôn."); obj.label32:setAutoSize(true); obj.label32:setHorzTextAlign("center"); obj.label32:setName("label32"); obj.label33 = GUI.fromHandle(_obj_newObject("label")); obj.label33:setParent(obj.layout7); obj.label33:setLeft(000); obj.label33:setTop(25); obj.label33:setHeight(20); obj.label33:setWidth(110); obj.label33:setText("Deslocamento"); obj.label33:setAutoSize(true); lfm_setPropAsString(obj.label33, "fontStyle", "bold"); obj.label33:setName("label33"); obj.edit43 = GUI.fromHandle(_obj_newObject("edit")); obj.edit43:setParent(obj.layout7); obj.edit43:setLeft(115); obj.edit43:setTop(25); obj.edit43:setHeight(20); obj.edit43:setWidth(30); obj.edit43:setField("DES_TER"); obj.edit43:setHorzTextAlign("center"); obj.edit43:setType("number"); obj.edit43:setEnabled(false); obj.edit43:setName("edit43"); obj.edit44 = GUI.fromHandle(_obj_newObject("edit")); obj.edit44:setParent(obj.layout7); obj.edit44:setLeft(150); obj.edit44:setTop(25); obj.edit44:setHeight(20); obj.edit44:setWidth(30); obj.edit44:setField("bas_DES_TER"); obj.edit44:setHorzTextAlign("center"); obj.edit44:setType("number"); obj.edit44:setEnabled(false); obj.edit44:setName("edit44"); obj.edit45 = GUI.fromHandle(_obj_newObject("edit")); obj.edit45:setParent(obj.layout7); obj.edit45:setLeft(185); obj.edit45:setTop(25); obj.edit45:setHeight(20); obj.edit45:setWidth(30); obj.edit45:setField("bon_DES_TER"); obj.edit45:setHorzTextAlign("center"); obj.edit45:setType("number"); obj.edit45:setName("edit45"); obj.label34 = GUI.fromHandle(_obj_newObject("label")); obj.label34:setParent(obj.layout7); obj.label34:setLeft(000); obj.label34:setTop(50); obj.label34:setHeight(20); obj.label34:setWidth(110); obj.label34:setText("Nadar"); obj.label34:setAutoSize(true); lfm_setPropAsString(obj.label34, "fontStyle", "bold"); obj.label34:setName("label34"); obj.edit46 = GUI.fromHandle(_obj_newObject("edit")); obj.edit46:setParent(obj.layout7); obj.edit46:setLeft(115); obj.edit46:setTop(50); obj.edit46:setHeight(20); obj.edit46:setWidth(30); obj.edit46:setField("DES_NAT"); obj.edit46:setHorzTextAlign("center"); obj.edit46:setType("number"); obj.edit46:setEnabled(false); obj.edit46:setName("edit46"); obj.edit47 = GUI.fromHandle(_obj_newObject("edit")); obj.edit47:setParent(obj.layout7); obj.edit47:setLeft(150); obj.edit47:setTop(50); obj.edit47:setHeight(20); obj.edit47:setWidth(30); obj.edit47:setField("bas_DES_NAT"); obj.edit47:setHorzTextAlign("center"); obj.edit47:setType("number"); obj.edit47:setEnabled(false); obj.edit47:setName("edit47"); obj.edit48 = GUI.fromHandle(_obj_newObject("edit")); obj.edit48:setParent(obj.layout7); obj.edit48:setLeft(185); obj.edit48:setTop(50); obj.edit48:setHeight(20); obj.edit48:setWidth(30); obj.edit48:setField("bon_DES_NAT"); obj.edit48:setHorzTextAlign("center"); obj.edit48:setType("number"); obj.edit48:setName("edit48"); obj.label35 = GUI.fromHandle(_obj_newObject("label")); obj.label35:setParent(obj.layout7); obj.label35:setLeft(000); obj.label35:setTop(75); obj.label35:setHeight(20); obj.label35:setWidth(110); obj.label35:setText("Mergulhar"); obj.label35:setAutoSize(true); lfm_setPropAsString(obj.label35, "fontStyle", "bold"); obj.label35:setName("label35"); obj.edit49 = GUI.fromHandle(_obj_newObject("edit")); obj.edit49:setParent(obj.layout7); obj.edit49:setLeft(115); obj.edit49:setTop(75); obj.edit49:setHeight(20); obj.edit49:setWidth(30); obj.edit49:setField("DES_SUB"); obj.edit49:setHorzTextAlign("center"); obj.edit49:setType("number"); obj.edit49:setEnabled(false); obj.edit49:setName("edit49"); obj.edit50 = GUI.fromHandle(_obj_newObject("edit")); obj.edit50:setParent(obj.layout7); obj.edit50:setLeft(150); obj.edit50:setTop(75); obj.edit50:setHeight(20); obj.edit50:setWidth(30); obj.edit50:setField("bas_DES_SUB"); obj.edit50:setHorzTextAlign("center"); obj.edit50:setType("number"); obj.edit50:setEnabled(false); obj.edit50:setName("edit50"); obj.edit51 = GUI.fromHandle(_obj_newObject("edit")); obj.edit51:setParent(obj.layout7); obj.edit51:setLeft(185); obj.edit51:setTop(75); obj.edit51:setHeight(20); obj.edit51:setWidth(30); obj.edit51:setField("bon_DES_SUB"); obj.edit51:setHorzTextAlign("center"); obj.edit51:setType("number"); obj.edit51:setName("edit51"); obj.layout8 = GUI.fromHandle(_obj_newObject("layout")); obj.layout8:setParent(obj.frmGeral); obj.layout8:setLeft(60); obj.layout8:setTop(460); obj.layout8:setHeight(650); obj.layout8:setWidth(1100); obj.layout8:setName("layout8"); obj.rectangle3 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle3:setParent(obj.layout8); obj.rectangle3:setLeft(0); obj.rectangle3:setTop(0); obj.rectangle3:setWidth(285); obj.rectangle3:setHeight(75); obj.rectangle3:setColor("black"); obj.rectangle3:setStrokeColor("red"); obj.rectangle3:setStrokeSize(1); obj.rectangle3:setCornerType("round"); obj.rectangle3:setName("rectangle3"); obj.image3 = GUI.fromHandle(_obj_newObject("image")); obj.image3:setParent(obj.layout8); obj.image3:setLeft(005); obj.image3:setTop(10); obj.image3:setHeight(50); obj.image3:setWidth(50); obj.image3:setField("ImagemSlot1"); obj.image3:setStyle("stretch"); lfm_setPropAsString(obj.image3, "animate", "true"); obj.image3:setName("image3"); obj.edit52 = GUI.fromHandle(_obj_newObject("edit")); obj.edit52:setParent(obj.layout8); obj.edit52:setLeft(060); obj.edit52:setTop(5); obj.edit52:setHeight(20); obj.edit52:setWidth(120); obj.edit52:setField("NomeSlot1"); obj.edit52:setHorzTextAlign("center"); obj.edit52:setEnabled(false); obj.edit52:setName("edit52"); obj.label36 = GUI.fromHandle(_obj_newObject("label")); obj.label36:setParent(obj.layout8); obj.label36:setLeft(060); obj.label36:setTop(30); obj.label36:setHeight(20); obj.label36:setWidth(20); obj.label36:setText("HP"); obj.label36:setAutoSize(true); lfm_setPropAsString(obj.label36, "fontStyle", "bold"); obj.label36:setName("label36"); obj.progressBar1 = GUI.fromHandle(_obj_newObject("progressBar")); obj.progressBar1:setParent(obj.layout8); obj.progressBar1:setLeft(080); obj.progressBar1:setTop(30); obj.progressBar1:setWidth(100); obj.progressBar1:setHeight(15); obj.progressBar1:setColor("green"); obj.progressBar1:setField("baseHPAtual1"); obj.progressBar1:setFieldMax("baseHPMAX1"); obj.progressBar1:setName("progressBar1"); obj.image4 = GUI.fromHandle(_obj_newObject("image")); obj.image4:setParent(obj.layout8); obj.image4:setLeft(235); obj.image4:setTop(25); obj.image4:setHeight(30); obj.image4:setWidth(30); obj.image4:setField("GenderSlot1"); obj.image4:setStyle("stretch"); obj.image4:setName("image4"); obj.label37 = GUI.fromHandle(_obj_newObject("label")); obj.label37:setParent(obj.layout8); obj.label37:setLeft(190); obj.label37:setTop(5); obj.label37:setHeight(20); obj.label37:setWidth(20); obj.label37:setText("Lv."); obj.label37:setAutoSize(true); lfm_setPropAsString(obj.label37, "fontStyle", "bold"); obj.label37:setName("label37"); obj.edit53 = GUI.fromHandle(_obj_newObject("edit")); obj.edit53:setParent(obj.layout8); obj.edit53:setLeft(210); obj.edit53:setTop(5); obj.edit53:setHeight(20); obj.edit53:setWidth(30); obj.edit53:setField("LevelSlot1"); obj.edit53:setHorzTextAlign("center"); obj.edit53:setEnabled(false); obj.edit53:setName("edit53"); obj.button1 = GUI.fromHandle(_obj_newObject("button")); obj.button1:setParent(obj.layout8); obj.button1:setLeft(262); obj.button1:setTop(51); obj.button1:setHeight(20); obj.button1:setWidth(20); obj.button1:setText("A"); obj.button1:setHint("Apagar"); obj.button1:setName("button1"); obj.edit54 = GUI.fromHandle(_obj_newObject("edit")); obj.edit54:setParent(obj.layout8); obj.edit54:setLeft(95); obj.edit54:setTop(50); obj.edit54:setHeight(20); obj.edit54:setWidth(30); obj.edit54:setField("baseHPAtual1"); obj.edit54:setHorzTextAlign("center"); obj.edit54:setEnabled(false); obj.edit54:setName("edit54"); obj.label38 = GUI.fromHandle(_obj_newObject("label")); obj.label38:setParent(obj.layout8); obj.label38:setLeft(125); obj.label38:setTop(50); obj.label38:setHeight(20); obj.label38:setWidth(5); obj.label38:setText("/"); obj.label38:setAutoSize(true); lfm_setPropAsString(obj.label38, "fontStyle", "bold"); obj.label38:setName("label38"); obj.edit55 = GUI.fromHandle(_obj_newObject("edit")); obj.edit55:setParent(obj.layout8); obj.edit55:setLeft(130); obj.edit55:setTop(50); obj.edit55:setHeight(20); obj.edit55:setWidth(30); obj.edit55:setField("baseHPMAX1"); obj.edit55:setHorzTextAlign("center"); obj.edit55:setEnabled(false); obj.edit55:setName("edit55"); obj.dataLink15 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink15:setParent(obj.layout8); obj.dataLink15:setField("baseHPAtual1"); obj.dataLink15:setDefaultValue("0"); obj.dataLink15:setName("dataLink15"); obj.dataLink16 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink16:setParent(obj.layout8); obj.dataLink16:setField("baseHPMAX1"); obj.dataLink16:setDefaultValue("0"); obj.dataLink16:setName("dataLink16"); obj.layout9 = GUI.fromHandle(_obj_newObject("layout")); obj.layout9:setParent(obj.frmGeral); obj.layout9:setLeft(60); obj.layout9:setTop(545); obj.layout9:setHeight(650); obj.layout9:setWidth(1100); obj.layout9:setName("layout9"); obj.rectangle4 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle4:setParent(obj.layout9); obj.rectangle4:setLeft(0); obj.rectangle4:setTop(0); obj.rectangle4:setWidth(285); obj.rectangle4:setHeight(75); obj.rectangle4:setColor("black"); obj.rectangle4:setStrokeColor("red"); obj.rectangle4:setStrokeSize(1); obj.rectangle4:setCornerType("round"); obj.rectangle4:setName("rectangle4"); obj.image5 = GUI.fromHandle(_obj_newObject("image")); obj.image5:setParent(obj.layout9); obj.image5:setLeft(005); obj.image5:setTop(10); obj.image5:setHeight(50); obj.image5:setWidth(50); obj.image5:setField("ImagemSlot2"); obj.image5:setStyle("stretch"); lfm_setPropAsString(obj.image5, "animate", "true"); obj.image5:setName("image5"); obj.edit56 = GUI.fromHandle(_obj_newObject("edit")); obj.edit56:setParent(obj.layout9); obj.edit56:setLeft(060); obj.edit56:setTop(5); obj.edit56:setHeight(20); obj.edit56:setWidth(120); obj.edit56:setField("NomeSlot2"); obj.edit56:setHorzTextAlign("center"); obj.edit56:setEnabled(false); obj.edit56:setName("edit56"); obj.label39 = GUI.fromHandle(_obj_newObject("label")); obj.label39:setParent(obj.layout9); obj.label39:setLeft(060); obj.label39:setTop(30); obj.label39:setHeight(20); obj.label39:setWidth(20); obj.label39:setText("HP"); obj.label39:setAutoSize(true); lfm_setPropAsString(obj.label39, "fontStyle", "bold"); obj.label39:setName("label39"); obj.progressBar2 = GUI.fromHandle(_obj_newObject("progressBar")); obj.progressBar2:setParent(obj.layout9); obj.progressBar2:setLeft(080); obj.progressBar2:setTop(30); obj.progressBar2:setWidth(100); obj.progressBar2:setHeight(15); obj.progressBar2:setColor("green"); obj.progressBar2:setField("baseHPAtual2"); obj.progressBar2:setFieldMax("baseHPMAX2"); obj.progressBar2:setName("progressBar2"); obj.image6 = GUI.fromHandle(_obj_newObject("image")); obj.image6:setParent(obj.layout9); obj.image6:setLeft(235); obj.image6:setTop(25); obj.image6:setHeight(30); obj.image6:setWidth(30); obj.image6:setField("GenderSlot2"); obj.image6:setStyle("stretch"); obj.image6:setName("image6"); obj.label40 = GUI.fromHandle(_obj_newObject("label")); obj.label40:setParent(obj.layout9); obj.label40:setLeft(190); obj.label40:setTop(5); obj.label40:setHeight(20); obj.label40:setWidth(20); obj.label40:setText("Lv."); obj.label40:setAutoSize(true); lfm_setPropAsString(obj.label40, "fontStyle", "bold"); obj.label40:setName("label40"); obj.edit57 = GUI.fromHandle(_obj_newObject("edit")); obj.edit57:setParent(obj.layout9); obj.edit57:setLeft(210); obj.edit57:setTop(5); obj.edit57:setHeight(20); obj.edit57:setWidth(30); obj.edit57:setField("LevelSlot2"); obj.edit57:setHorzTextAlign("center"); obj.edit57:setEnabled(false); obj.edit57:setName("edit57"); obj.button2 = GUI.fromHandle(_obj_newObject("button")); obj.button2:setParent(obj.layout9); obj.button2:setLeft(262); obj.button2:setTop(51); obj.button2:setHeight(20); obj.button2:setWidth(20); obj.button2:setText("A"); obj.button2:setHint("Apagar"); obj.button2:setName("button2"); obj.edit58 = GUI.fromHandle(_obj_newObject("edit")); obj.edit58:setParent(obj.layout9); obj.edit58:setLeft(95); obj.edit58:setTop(50); obj.edit58:setHeight(20); obj.edit58:setWidth(30); obj.edit58:setField("baseHPAtual2"); obj.edit58:setHorzTextAlign("center"); obj.edit58:setEnabled(false); obj.edit58:setName("edit58"); obj.label41 = GUI.fromHandle(_obj_newObject("label")); obj.label41:setParent(obj.layout9); obj.label41:setLeft(125); obj.label41:setTop(50); obj.label41:setHeight(20); obj.label41:setWidth(5); obj.label41:setText("/"); obj.label41:setAutoSize(true); lfm_setPropAsString(obj.label41, "fontStyle", "bold"); obj.label41:setName("label41"); obj.edit59 = GUI.fromHandle(_obj_newObject("edit")); obj.edit59:setParent(obj.layout9); obj.edit59:setLeft(130); obj.edit59:setTop(50); obj.edit59:setHeight(20); obj.edit59:setWidth(30); obj.edit59:setField("baseHPMAX2"); obj.edit59:setHorzTextAlign("center"); obj.edit59:setEnabled(false); obj.edit59:setName("edit59"); obj.dataLink17 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink17:setParent(obj.layout9); obj.dataLink17:setField("baseHPAtual2"); obj.dataLink17:setDefaultValue("0"); obj.dataLink17:setName("dataLink17"); obj.dataLink18 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink18:setParent(obj.layout9); obj.dataLink18:setField("baseHPMAX2"); obj.dataLink18:setDefaultValue("0"); obj.dataLink18:setName("dataLink18"); obj.layout10 = GUI.fromHandle(_obj_newObject("layout")); obj.layout10:setParent(obj.frmGeral); obj.layout10:setLeft(350); obj.layout10:setTop(460); obj.layout10:setHeight(650); obj.layout10:setWidth(1100); obj.layout10:setName("layout10"); obj.rectangle5 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle5:setParent(obj.layout10); obj.rectangle5:setLeft(0); obj.rectangle5:setTop(0); obj.rectangle5:setWidth(285); obj.rectangle5:setHeight(75); obj.rectangle5:setColor("black"); obj.rectangle5:setStrokeColor("red"); obj.rectangle5:setStrokeSize(1); obj.rectangle5:setCornerType("round"); obj.rectangle5:setName("rectangle5"); obj.image7 = GUI.fromHandle(_obj_newObject("image")); obj.image7:setParent(obj.layout10); obj.image7:setLeft(005); obj.image7:setTop(10); obj.image7:setHeight(50); obj.image7:setWidth(50); obj.image7:setField("ImagemSlot3"); obj.image7:setStyle("stretch"); lfm_setPropAsString(obj.image7, "animate", "true"); obj.image7:setName("image7"); obj.edit60 = GUI.fromHandle(_obj_newObject("edit")); obj.edit60:setParent(obj.layout10); obj.edit60:setLeft(060); obj.edit60:setTop(5); obj.edit60:setHeight(20); obj.edit60:setWidth(120); obj.edit60:setField("NomeSlot3"); obj.edit60:setHorzTextAlign("center"); obj.edit60:setEnabled(false); obj.edit60:setName("edit60"); obj.label42 = GUI.fromHandle(_obj_newObject("label")); obj.label42:setParent(obj.layout10); obj.label42:setLeft(060); obj.label42:setTop(30); obj.label42:setHeight(20); obj.label42:setWidth(20); obj.label42:setText("HP"); obj.label42:setAutoSize(true); lfm_setPropAsString(obj.label42, "fontStyle", "bold"); obj.label42:setName("label42"); obj.progressBar3 = GUI.fromHandle(_obj_newObject("progressBar")); obj.progressBar3:setParent(obj.layout10); obj.progressBar3:setLeft(080); obj.progressBar3:setTop(30); obj.progressBar3:setWidth(100); obj.progressBar3:setHeight(15); obj.progressBar3:setColor("green"); obj.progressBar3:setField("baseHPAtual3"); obj.progressBar3:setFieldMax("baseHPMAX3"); obj.progressBar3:setName("progressBar3"); obj.image8 = GUI.fromHandle(_obj_newObject("image")); obj.image8:setParent(obj.layout10); obj.image8:setLeft(235); obj.image8:setTop(25); obj.image8:setHeight(30); obj.image8:setWidth(30); obj.image8:setField("GenderSlot3"); obj.image8:setStyle("stretch"); obj.image8:setName("image8"); obj.label43 = GUI.fromHandle(_obj_newObject("label")); obj.label43:setParent(obj.layout10); obj.label43:setLeft(190); obj.label43:setTop(5); obj.label43:setHeight(20); obj.label43:setWidth(20); obj.label43:setText("Lv."); obj.label43:setAutoSize(true); lfm_setPropAsString(obj.label43, "fontStyle", "bold"); obj.label43:setName("label43"); obj.edit61 = GUI.fromHandle(_obj_newObject("edit")); obj.edit61:setParent(obj.layout10); obj.edit61:setLeft(210); obj.edit61:setTop(5); obj.edit61:setHeight(20); obj.edit61:setWidth(30); obj.edit61:setField("LevelSlot3"); obj.edit61:setHorzTextAlign("center"); obj.edit61:setEnabled(false); obj.edit61:setName("edit61"); obj.button3 = GUI.fromHandle(_obj_newObject("button")); obj.button3:setParent(obj.layout10); obj.button3:setLeft(262); obj.button3:setTop(51); obj.button3:setHeight(20); obj.button3:setWidth(20); obj.button3:setText("A"); obj.button3:setHint("Apagar"); obj.button3:setName("button3"); obj.edit62 = GUI.fromHandle(_obj_newObject("edit")); obj.edit62:setParent(obj.layout10); obj.edit62:setLeft(95); obj.edit62:setTop(50); obj.edit62:setHeight(20); obj.edit62:setWidth(30); obj.edit62:setField("baseHPAtual3"); obj.edit62:setHorzTextAlign("center"); obj.edit62:setEnabled(false); obj.edit62:setName("edit62"); obj.label44 = GUI.fromHandle(_obj_newObject("label")); obj.label44:setParent(obj.layout10); obj.label44:setLeft(125); obj.label44:setTop(50); obj.label44:setHeight(20); obj.label44:setWidth(5); obj.label44:setText("/"); obj.label44:setAutoSize(true); lfm_setPropAsString(obj.label44, "fontStyle", "bold"); obj.label44:setName("label44"); obj.edit63 = GUI.fromHandle(_obj_newObject("edit")); obj.edit63:setParent(obj.layout10); obj.edit63:setLeft(130); obj.edit63:setTop(50); obj.edit63:setHeight(20); obj.edit63:setWidth(30); obj.edit63:setField("baseHPMAX3"); obj.edit63:setHorzTextAlign("center"); obj.edit63:setEnabled(false); obj.edit63:setName("edit63"); obj.dataLink19 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink19:setParent(obj.layout10); obj.dataLink19:setField("baseHPAtual3"); obj.dataLink19:setDefaultValue("0"); obj.dataLink19:setName("dataLink19"); obj.dataLink20 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink20:setParent(obj.layout10); obj.dataLink20:setField("baseHPMAX3"); obj.dataLink20:setDefaultValue("0"); obj.dataLink20:setName("dataLink20"); obj.layout11 = GUI.fromHandle(_obj_newObject("layout")); obj.layout11:setParent(obj.frmGeral); obj.layout11:setLeft(350); obj.layout11:setTop(545); obj.layout11:setHeight(650); obj.layout11:setWidth(1100); obj.layout11:setName("layout11"); obj.rectangle6 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle6:setParent(obj.layout11); obj.rectangle6:setLeft(0); obj.rectangle6:setTop(0); obj.rectangle6:setWidth(285); obj.rectangle6:setHeight(75); obj.rectangle6:setColor("black"); obj.rectangle6:setStrokeColor("red"); obj.rectangle6:setStrokeSize(1); obj.rectangle6:setCornerType("round"); obj.rectangle6:setName("rectangle6"); obj.image9 = GUI.fromHandle(_obj_newObject("image")); obj.image9:setParent(obj.layout11); obj.image9:setLeft(005); obj.image9:setTop(10); obj.image9:setHeight(50); obj.image9:setWidth(50); obj.image9:setField("ImagemSlot4"); obj.image9:setStyle("stretch"); lfm_setPropAsString(obj.image9, "animate", "true"); obj.image9:setName("image9"); obj.edit64 = GUI.fromHandle(_obj_newObject("edit")); obj.edit64:setParent(obj.layout11); obj.edit64:setLeft(060); obj.edit64:setTop(5); obj.edit64:setHeight(20); obj.edit64:setWidth(120); obj.edit64:setField("NomeSlot4"); obj.edit64:setHorzTextAlign("center"); obj.edit64:setEnabled(false); obj.edit64:setName("edit64"); obj.label45 = GUI.fromHandle(_obj_newObject("label")); obj.label45:setParent(obj.layout11); obj.label45:setLeft(060); obj.label45:setTop(30); obj.label45:setHeight(20); obj.label45:setWidth(20); obj.label45:setText("HP"); obj.label45:setAutoSize(true); lfm_setPropAsString(obj.label45, "fontStyle", "bold"); obj.label45:setName("label45"); obj.progressBar4 = GUI.fromHandle(_obj_newObject("progressBar")); obj.progressBar4:setParent(obj.layout11); obj.progressBar4:setLeft(080); obj.progressBar4:setTop(30); obj.progressBar4:setWidth(100); obj.progressBar4:setHeight(15); obj.progressBar4:setColor("green"); obj.progressBar4:setField("baseHPAtual4"); obj.progressBar4:setFieldMax("baseHPMAX4"); obj.progressBar4:setName("progressBar4"); obj.image10 = GUI.fromHandle(_obj_newObject("image")); obj.image10:setParent(obj.layout11); obj.image10:setLeft(235); obj.image10:setTop(25); obj.image10:setHeight(30); obj.image10:setWidth(30); obj.image10:setField("GenderSlot4"); obj.image10:setStyle("stretch"); obj.image10:setName("image10"); obj.label46 = GUI.fromHandle(_obj_newObject("label")); obj.label46:setParent(obj.layout11); obj.label46:setLeft(190); obj.label46:setTop(5); obj.label46:setHeight(20); obj.label46:setWidth(20); obj.label46:setText("Lv."); obj.label46:setAutoSize(true); lfm_setPropAsString(obj.label46, "fontStyle", "bold"); obj.label46:setName("label46"); obj.edit65 = GUI.fromHandle(_obj_newObject("edit")); obj.edit65:setParent(obj.layout11); obj.edit65:setLeft(210); obj.edit65:setTop(5); obj.edit65:setHeight(20); obj.edit65:setWidth(30); obj.edit65:setField("LevelSlot4"); obj.edit65:setHorzTextAlign("center"); obj.edit65:setEnabled(false); obj.edit65:setName("edit65"); obj.button4 = GUI.fromHandle(_obj_newObject("button")); obj.button4:setParent(obj.layout11); obj.button4:setLeft(262); obj.button4:setTop(51); obj.button4:setHeight(20); obj.button4:setWidth(20); obj.button4:setText("A"); obj.button4:setHint("Apagar"); obj.button4:setName("button4"); obj.edit66 = GUI.fromHandle(_obj_newObject("edit")); obj.edit66:setParent(obj.layout11); obj.edit66:setLeft(95); obj.edit66:setTop(50); obj.edit66:setHeight(20); obj.edit66:setWidth(30); obj.edit66:setField("baseHPAtual4"); obj.edit66:setHorzTextAlign("center"); obj.edit66:setEnabled(false); obj.edit66:setName("edit66"); obj.label47 = GUI.fromHandle(_obj_newObject("label")); obj.label47:setParent(obj.layout11); obj.label47:setLeft(125); obj.label47:setTop(50); obj.label47:setHeight(20); obj.label47:setWidth(5); obj.label47:setText("/"); obj.label47:setAutoSize(true); lfm_setPropAsString(obj.label47, "fontStyle", "bold"); obj.label47:setName("label47"); obj.edit67 = GUI.fromHandle(_obj_newObject("edit")); obj.edit67:setParent(obj.layout11); obj.edit67:setLeft(130); obj.edit67:setTop(50); obj.edit67:setHeight(20); obj.edit67:setWidth(30); obj.edit67:setField("baseHPMAX4"); obj.edit67:setHorzTextAlign("center"); obj.edit67:setEnabled(false); obj.edit67:setName("edit67"); obj.dataLink21 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink21:setParent(obj.layout11); obj.dataLink21:setField("baseHPAtual4"); obj.dataLink21:setDefaultValue("0"); obj.dataLink21:setName("dataLink21"); obj.dataLink22 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink22:setParent(obj.layout11); obj.dataLink22:setField("baseHPMAX4"); obj.dataLink22:setDefaultValue("0"); obj.dataLink22:setName("dataLink22"); obj.layout12 = GUI.fromHandle(_obj_newObject("layout")); obj.layout12:setParent(obj.frmGeral); obj.layout12:setLeft(640); obj.layout12:setTop(460); obj.layout12:setHeight(650); obj.layout12:setWidth(1100); obj.layout12:setName("layout12"); obj.rectangle7 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle7:setParent(obj.layout12); obj.rectangle7:setLeft(0); obj.rectangle7:setTop(0); obj.rectangle7:setWidth(285); obj.rectangle7:setHeight(75); obj.rectangle7:setColor("black"); obj.rectangle7:setStrokeColor("red"); obj.rectangle7:setStrokeSize(1); obj.rectangle7:setCornerType("round"); obj.rectangle7:setName("rectangle7"); obj.image11 = GUI.fromHandle(_obj_newObject("image")); obj.image11:setParent(obj.layout12); obj.image11:setLeft(005); obj.image11:setTop(10); obj.image11:setHeight(50); obj.image11:setWidth(50); obj.image11:setField("ImagemSlot5"); obj.image11:setStyle("stretch"); lfm_setPropAsString(obj.image11, "animate", "true"); obj.image11:setName("image11"); obj.edit68 = GUI.fromHandle(_obj_newObject("edit")); obj.edit68:setParent(obj.layout12); obj.edit68:setLeft(060); obj.edit68:setTop(5); obj.edit68:setHeight(20); obj.edit68:setWidth(120); obj.edit68:setField("NomeSlot5"); obj.edit68:setHorzTextAlign("center"); obj.edit68:setEnabled(false); obj.edit68:setName("edit68"); obj.label48 = GUI.fromHandle(_obj_newObject("label")); obj.label48:setParent(obj.layout12); obj.label48:setLeft(060); obj.label48:setTop(30); obj.label48:setHeight(20); obj.label48:setWidth(20); obj.label48:setText("HP"); obj.label48:setAutoSize(true); lfm_setPropAsString(obj.label48, "fontStyle", "bold"); obj.label48:setName("label48"); obj.progressBar5 = GUI.fromHandle(_obj_newObject("progressBar")); obj.progressBar5:setParent(obj.layout12); obj.progressBar5:setLeft(080); obj.progressBar5:setTop(30); obj.progressBar5:setWidth(100); obj.progressBar5:setHeight(15); obj.progressBar5:setColor("green"); obj.progressBar5:setField("baseHPAtual5"); obj.progressBar5:setFieldMax("baseHPMAX5"); obj.progressBar5:setName("progressBar5"); obj.image12 = GUI.fromHandle(_obj_newObject("image")); obj.image12:setParent(obj.layout12); obj.image12:setLeft(235); obj.image12:setTop(25); obj.image12:setHeight(30); obj.image12:setWidth(30); obj.image12:setField("GenderSlot5"); obj.image12:setStyle("stretch"); obj.image12:setName("image12"); obj.label49 = GUI.fromHandle(_obj_newObject("label")); obj.label49:setParent(obj.layout12); obj.label49:setLeft(190); obj.label49:setTop(5); obj.label49:setHeight(20); obj.label49:setWidth(20); obj.label49:setText("Lv."); obj.label49:setAutoSize(true); lfm_setPropAsString(obj.label49, "fontStyle", "bold"); obj.label49:setName("label49"); obj.edit69 = GUI.fromHandle(_obj_newObject("edit")); obj.edit69:setParent(obj.layout12); obj.edit69:setLeft(210); obj.edit69:setTop(5); obj.edit69:setHeight(20); obj.edit69:setWidth(30); obj.edit69:setField("LevelSlot5"); obj.edit69:setHorzTextAlign("center"); obj.edit69:setEnabled(false); obj.edit69:setName("edit69"); obj.button5 = GUI.fromHandle(_obj_newObject("button")); obj.button5:setParent(obj.layout12); obj.button5:setLeft(262); obj.button5:setTop(51); obj.button5:setHeight(20); obj.button5:setWidth(20); obj.button5:setText("A"); obj.button5:setHint("Apagar"); obj.button5:setName("button5"); obj.edit70 = GUI.fromHandle(_obj_newObject("edit")); obj.edit70:setParent(obj.layout12); obj.edit70:setLeft(95); obj.edit70:setTop(50); obj.edit70:setHeight(20); obj.edit70:setWidth(30); obj.edit70:setField("baseHPAtual5"); obj.edit70:setHorzTextAlign("center"); obj.edit70:setEnabled(false); obj.edit70:setName("edit70"); obj.label50 = GUI.fromHandle(_obj_newObject("label")); obj.label50:setParent(obj.layout12); obj.label50:setLeft(125); obj.label50:setTop(50); obj.label50:setHeight(20); obj.label50:setWidth(5); obj.label50:setText("/"); obj.label50:setAutoSize(true); lfm_setPropAsString(obj.label50, "fontStyle", "bold"); obj.label50:setName("label50"); obj.edit71 = GUI.fromHandle(_obj_newObject("edit")); obj.edit71:setParent(obj.layout12); obj.edit71:setLeft(130); obj.edit71:setTop(50); obj.edit71:setHeight(20); obj.edit71:setWidth(30); obj.edit71:setField("baseHPMAX5"); obj.edit71:setHorzTextAlign("center"); obj.edit71:setEnabled(false); obj.edit71:setName("edit71"); obj.dataLink23 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink23:setParent(obj.layout12); obj.dataLink23:setField("baseHPAtual5"); obj.dataLink23:setDefaultValue("0"); obj.dataLink23:setName("dataLink23"); obj.dataLink24 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink24:setParent(obj.layout12); obj.dataLink24:setField("baseHPMAX5"); obj.dataLink24:setDefaultValue("0"); obj.dataLink24:setName("dataLink24"); obj.layout13 = GUI.fromHandle(_obj_newObject("layout")); obj.layout13:setParent(obj.frmGeral); obj.layout13:setLeft(640); obj.layout13:setTop(545); obj.layout13:setHeight(650); obj.layout13:setWidth(1100); obj.layout13:setName("layout13"); obj.rectangle8 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle8:setParent(obj.layout13); obj.rectangle8:setLeft(0); obj.rectangle8:setTop(0); obj.rectangle8:setWidth(285); obj.rectangle8:setHeight(75); obj.rectangle8:setColor("black"); obj.rectangle8:setStrokeColor("red"); obj.rectangle8:setStrokeSize(1); obj.rectangle8:setCornerType("round"); obj.rectangle8:setName("rectangle8"); obj.image13 = GUI.fromHandle(_obj_newObject("image")); obj.image13:setParent(obj.layout13); obj.image13:setLeft(005); obj.image13:setTop(10); obj.image13:setHeight(50); obj.image13:setWidth(50); obj.image13:setField("ImagemSlot6"); obj.image13:setStyle("stretch"); lfm_setPropAsString(obj.image13, "animate", "true"); obj.image13:setName("image13"); obj.edit72 = GUI.fromHandle(_obj_newObject("edit")); obj.edit72:setParent(obj.layout13); obj.edit72:setLeft(060); obj.edit72:setTop(5); obj.edit72:setHeight(20); obj.edit72:setWidth(120); obj.edit72:setField("NomeSlot6"); obj.edit72:setHorzTextAlign("center"); obj.edit72:setEnabled(false); obj.edit72:setName("edit72"); obj.label51 = GUI.fromHandle(_obj_newObject("label")); obj.label51:setParent(obj.layout13); obj.label51:setLeft(060); obj.label51:setTop(30); obj.label51:setHeight(20); obj.label51:setWidth(20); obj.label51:setText("HP"); obj.label51:setAutoSize(true); lfm_setPropAsString(obj.label51, "fontStyle", "bold"); obj.label51:setName("label51"); obj.progressBar6 = GUI.fromHandle(_obj_newObject("progressBar")); obj.progressBar6:setParent(obj.layout13); obj.progressBar6:setLeft(080); obj.progressBar6:setTop(30); obj.progressBar6:setWidth(100); obj.progressBar6:setHeight(15); obj.progressBar6:setColor("green"); obj.progressBar6:setField("baseHPAtual6"); obj.progressBar6:setFieldMax("baseHPMAX6"); obj.progressBar6:setName("progressBar6"); obj.image14 = GUI.fromHandle(_obj_newObject("image")); obj.image14:setParent(obj.layout13); obj.image14:setLeft(235); obj.image14:setTop(25); obj.image14:setHeight(30); obj.image14:setWidth(30); obj.image14:setField("GenderSlot6"); obj.image14:setStyle("stretch"); obj.image14:setName("image14"); obj.label52 = GUI.fromHandle(_obj_newObject("label")); obj.label52:setParent(obj.layout13); obj.label52:setLeft(190); obj.label52:setTop(5); obj.label52:setHeight(20); obj.label52:setWidth(20); obj.label52:setText("Lv."); obj.label52:setAutoSize(true); lfm_setPropAsString(obj.label52, "fontStyle", "bold"); obj.label52:setName("label52"); obj.edit73 = GUI.fromHandle(_obj_newObject("edit")); obj.edit73:setParent(obj.layout13); obj.edit73:setLeft(210); obj.edit73:setTop(5); obj.edit73:setHeight(20); obj.edit73:setWidth(30); obj.edit73:setField("LevelSlot6"); obj.edit73:setHorzTextAlign("center"); obj.edit73:setEnabled(false); obj.edit73:setName("edit73"); obj.button6 = GUI.fromHandle(_obj_newObject("button")); obj.button6:setParent(obj.layout13); obj.button6:setLeft(262); obj.button6:setTop(51); obj.button6:setHeight(20); obj.button6:setWidth(20); obj.button6:setText("A"); obj.button6:setHint("Apagar"); obj.button6:setName("button6"); obj.edit74 = GUI.fromHandle(_obj_newObject("edit")); obj.edit74:setParent(obj.layout13); obj.edit74:setLeft(95); obj.edit74:setTop(50); obj.edit74:setHeight(20); obj.edit74:setWidth(30); obj.edit74:setField("baseHPAtual6"); obj.edit74:setHorzTextAlign("center"); obj.edit74:setEnabled(false); obj.edit74:setName("edit74"); obj.label53 = GUI.fromHandle(_obj_newObject("label")); obj.label53:setParent(obj.layout13); obj.label53:setLeft(125); obj.label53:setTop(50); obj.label53:setHeight(20); obj.label53:setWidth(5); obj.label53:setText("/"); obj.label53:setAutoSize(true); lfm_setPropAsString(obj.label53, "fontStyle", "bold"); obj.label53:setName("label53"); obj.edit75 = GUI.fromHandle(_obj_newObject("edit")); obj.edit75:setParent(obj.layout13); obj.edit75:setLeft(130); obj.edit75:setTop(50); obj.edit75:setHeight(20); obj.edit75:setWidth(30); obj.edit75:setField("baseHPMAX6"); obj.edit75:setHorzTextAlign("center"); obj.edit75:setEnabled(false); obj.edit75:setName("edit75"); obj.dataLink25 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink25:setParent(obj.layout13); obj.dataLink25:setField("baseHPAtual6"); obj.dataLink25:setDefaultValue("0"); obj.dataLink25:setName("dataLink25"); obj.dataLink26 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink26:setParent(obj.layout13); obj.dataLink26:setField("baseHPMAX6"); obj.dataLink26:setDefaultValue("0"); obj.dataLink26:setName("dataLink26"); obj.layout14 = GUI.fromHandle(_obj_newObject("layout")); obj.layout14:setParent(obj.frmGeral); obj.layout14:setLeft(990); obj.layout14:setTop(13); obj.layout14:setHeight(800); obj.layout14:setWidth(100); obj.layout14:setName("layout14"); obj.rectangle9 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle9:setParent(obj.layout14); obj.rectangle9:setLeft(000); obj.rectangle9:setTop(00); obj.rectangle9:setWidth(40); obj.rectangle9:setHeight(40); obj.rectangle9:setColor("Red"); obj.rectangle9:setStrokeColor("black"); obj.rectangle9:setStrokeSize(4); obj.rectangle9:setName("rectangle9"); obj.rectangle10 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle10:setParent(obj.layout14); obj.rectangle10:setLeft(005); obj.rectangle10:setTop(05); obj.rectangle10:setWidth(30); obj.rectangle10:setHeight(30); obj.rectangle10:setColor("Black"); obj.rectangle10:setStrokeColor("black"); obj.rectangle10:setStrokeSize(4); obj.rectangle10:setName("rectangle10"); obj.image15 = GUI.fromHandle(_obj_newObject("image")); obj.image15:setParent(obj.layout14); obj.image15:setLeft(005); obj.image15:setTop(00); obj.image15:setWidth(30); obj.image15:setHeight(30); obj.image15:setField("basBADGE11"); obj.image15:setEditable(true); obj.image15:setStyle("proportional"); obj.image15:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image15:setName("image15"); obj.rectangle11 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle11:setParent(obj.layout14); obj.rectangle11:setLeft(000); obj.rectangle11:setTop(45); obj.rectangle11:setWidth(40); obj.rectangle11:setHeight(40); obj.rectangle11:setColor("Red"); obj.rectangle11:setStrokeColor("black"); obj.rectangle11:setStrokeSize(4); obj.rectangle11:setName("rectangle11"); obj.rectangle12 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle12:setParent(obj.layout14); obj.rectangle12:setLeft(005); obj.rectangle12:setTop(50); obj.rectangle12:setWidth(30); obj.rectangle12:setHeight(30); obj.rectangle12:setColor("Black"); obj.rectangle12:setStrokeColor("black"); obj.rectangle12:setStrokeSize(4); obj.rectangle12:setName("rectangle12"); obj.image16 = GUI.fromHandle(_obj_newObject("image")); obj.image16:setParent(obj.layout14); obj.image16:setLeft(005); obj.image16:setTop(45); obj.image16:setWidth(30); obj.image16:setHeight(30); obj.image16:setField("basBADGE12"); obj.image16:setEditable(true); obj.image16:setStyle("proportional"); obj.image16:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image16:setName("image16"); obj.rectangle13 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle13:setParent(obj.layout14); obj.rectangle13:setLeft(000); obj.rectangle13:setTop(90); obj.rectangle13:setWidth(40); obj.rectangle13:setHeight(40); obj.rectangle13:setColor("Red"); obj.rectangle13:setStrokeColor("black"); obj.rectangle13:setStrokeSize(4); obj.rectangle13:setName("rectangle13"); obj.rectangle14 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle14:setParent(obj.layout14); obj.rectangle14:setLeft(005); obj.rectangle14:setTop(95); obj.rectangle14:setWidth(30); obj.rectangle14:setHeight(30); obj.rectangle14:setColor("Black"); obj.rectangle14:setStrokeColor("black"); obj.rectangle14:setStrokeSize(4); obj.rectangle14:setName("rectangle14"); obj.image17 = GUI.fromHandle(_obj_newObject("image")); obj.image17:setParent(obj.layout14); obj.image17:setLeft(005); obj.image17:setTop(90); obj.image17:setWidth(30); obj.image17:setHeight(30); obj.image17:setField("basBADGE13"); obj.image17:setEditable(true); obj.image17:setStyle("proportional"); obj.image17:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image17:setName("image17"); obj.rectangle15 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle15:setParent(obj.layout14); obj.rectangle15:setLeft(000); obj.rectangle15:setTop(135); obj.rectangle15:setWidth(40); obj.rectangle15:setHeight(40); obj.rectangle15:setColor("Red"); obj.rectangle15:setStrokeColor("black"); obj.rectangle15:setStrokeSize(4); obj.rectangle15:setName("rectangle15"); obj.rectangle16 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle16:setParent(obj.layout14); obj.rectangle16:setLeft(005); obj.rectangle16:setTop(140); obj.rectangle16:setWidth(30); obj.rectangle16:setHeight(30); obj.rectangle16:setColor("Black"); obj.rectangle16:setStrokeColor("black"); obj.rectangle16:setStrokeSize(4); obj.rectangle16:setName("rectangle16"); obj.image18 = GUI.fromHandle(_obj_newObject("image")); obj.image18:setParent(obj.layout14); obj.image18:setLeft(005); obj.image18:setTop(135); obj.image18:setWidth(30); obj.image18:setHeight(30); obj.image18:setField("basBADGE14"); obj.image18:setEditable(true); obj.image18:setStyle("proportional"); obj.image18:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image18:setName("image18"); obj.rectangle17 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle17:setParent(obj.layout14); obj.rectangle17:setLeft(000); obj.rectangle17:setTop(180); obj.rectangle17:setWidth(40); obj.rectangle17:setHeight(40); obj.rectangle17:setColor("Red"); obj.rectangle17:setStrokeColor("black"); obj.rectangle17:setStrokeSize(4); obj.rectangle17:setName("rectangle17"); obj.rectangle18 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle18:setParent(obj.layout14); obj.rectangle18:setLeft(005); obj.rectangle18:setTop(185); obj.rectangle18:setWidth(30); obj.rectangle18:setHeight(30); obj.rectangle18:setColor("Black"); obj.rectangle18:setStrokeColor("black"); obj.rectangle18:setStrokeSize(4); obj.rectangle18:setName("rectangle18"); obj.image19 = GUI.fromHandle(_obj_newObject("image")); obj.image19:setParent(obj.layout14); obj.image19:setLeft(005); obj.image19:setTop(180); obj.image19:setWidth(30); obj.image19:setHeight(30); obj.image19:setField("basBADGE15"); obj.image19:setEditable(true); obj.image19:setStyle("proportional"); obj.image19:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image19:setName("image19"); obj.rectangle19 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle19:setParent(obj.layout14); obj.rectangle19:setLeft(000); obj.rectangle19:setTop(225); obj.rectangle19:setWidth(40); obj.rectangle19:setHeight(40); obj.rectangle19:setColor("Red"); obj.rectangle19:setStrokeColor("black"); obj.rectangle19:setStrokeSize(4); obj.rectangle19:setName("rectangle19"); obj.rectangle20 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle20:setParent(obj.layout14); obj.rectangle20:setLeft(005); obj.rectangle20:setTop(230); obj.rectangle20:setWidth(30); obj.rectangle20:setHeight(30); obj.rectangle20:setColor("Black"); obj.rectangle20:setStrokeColor("black"); obj.rectangle20:setStrokeSize(4); obj.rectangle20:setName("rectangle20"); obj.image20 = GUI.fromHandle(_obj_newObject("image")); obj.image20:setParent(obj.layout14); obj.image20:setLeft(005); obj.image20:setTop(225); obj.image20:setWidth(30); obj.image20:setHeight(30); obj.image20:setField("basBADGE16"); obj.image20:setEditable(true); obj.image20:setStyle("proportional"); obj.image20:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image20:setName("image20"); obj.rectangle21 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle21:setParent(obj.layout14); obj.rectangle21:setLeft(000); obj.rectangle21:setTop(270); obj.rectangle21:setWidth(40); obj.rectangle21:setHeight(40); obj.rectangle21:setColor("Red"); obj.rectangle21:setStrokeColor("black"); obj.rectangle21:setStrokeSize(4); obj.rectangle21:setName("rectangle21"); obj.rectangle22 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle22:setParent(obj.layout14); obj.rectangle22:setLeft(005); obj.rectangle22:setTop(275); obj.rectangle22:setWidth(30); obj.rectangle22:setHeight(30); obj.rectangle22:setColor("Black"); obj.rectangle22:setStrokeColor("black"); obj.rectangle22:setStrokeSize(4); obj.rectangle22:setName("rectangle22"); obj.image21 = GUI.fromHandle(_obj_newObject("image")); obj.image21:setParent(obj.layout14); obj.image21:setLeft(005); obj.image21:setTop(270); obj.image21:setWidth(30); obj.image21:setHeight(30); obj.image21:setField("basBADGE17"); obj.image21:setEditable(true); obj.image21:setStyle("proportional"); obj.image21:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image21:setName("image21"); obj.rectangle23 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle23:setParent(obj.layout14); obj.rectangle23:setLeft(000); obj.rectangle23:setTop(315); obj.rectangle23:setWidth(40); obj.rectangle23:setHeight(40); obj.rectangle23:setColor("Red"); obj.rectangle23:setStrokeColor("black"); obj.rectangle23:setStrokeSize(4); obj.rectangle23:setName("rectangle23"); obj.rectangle24 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle24:setParent(obj.layout14); obj.rectangle24:setLeft(005); obj.rectangle24:setTop(320); obj.rectangle24:setWidth(30); obj.rectangle24:setHeight(30); obj.rectangle24:setColor("Black"); obj.rectangle24:setStrokeColor("black"); obj.rectangle24:setStrokeSize(4); obj.rectangle24:setName("rectangle24"); obj.image22 = GUI.fromHandle(_obj_newObject("image")); obj.image22:setParent(obj.layout14); obj.image22:setLeft(005); obj.image22:setTop(315); obj.image22:setWidth(30); obj.image22:setHeight(30); obj.image22:setField("basBADGE18"); obj.image22:setEditable(true); obj.image22:setStyle("proportional"); obj.image22:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image22:setName("image22"); obj.layout15 = GUI.fromHandle(_obj_newObject("layout")); obj.layout15:setParent(obj.frmGeral); obj.layout15:setLeft(1040); obj.layout15:setTop(13); obj.layout15:setHeight(800); obj.layout15:setWidth(100); obj.layout15:setName("layout15"); obj.rectangle25 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle25:setParent(obj.layout15); obj.rectangle25:setLeft(000); obj.rectangle25:setTop(00); obj.rectangle25:setWidth(40); obj.rectangle25:setHeight(40); obj.rectangle25:setColor("Red"); obj.rectangle25:setStrokeColor("black"); obj.rectangle25:setStrokeSize(4); obj.rectangle25:setName("rectangle25"); obj.rectangle26 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle26:setParent(obj.layout15); obj.rectangle26:setLeft(005); obj.rectangle26:setTop(05); obj.rectangle26:setWidth(30); obj.rectangle26:setHeight(30); obj.rectangle26:setColor("Black"); obj.rectangle26:setStrokeColor("black"); obj.rectangle26:setStrokeSize(4); obj.rectangle26:setName("rectangle26"); obj.image23 = GUI.fromHandle(_obj_newObject("image")); obj.image23:setParent(obj.layout15); obj.image23:setLeft(005); obj.image23:setTop(00); obj.image23:setWidth(30); obj.image23:setHeight(30); obj.image23:setField("basBADGE19"); obj.image23:setEditable(true); obj.image23:setStyle("proportional"); obj.image23:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image23:setName("image23"); obj.rectangle27 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle27:setParent(obj.layout15); obj.rectangle27:setLeft(000); obj.rectangle27:setTop(45); obj.rectangle27:setWidth(40); obj.rectangle27:setHeight(40); obj.rectangle27:setColor("Red"); obj.rectangle27:setStrokeColor("black"); obj.rectangle27:setStrokeSize(4); obj.rectangle27:setName("rectangle27"); obj.rectangle28 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle28:setParent(obj.layout15); obj.rectangle28:setLeft(005); obj.rectangle28:setTop(50); obj.rectangle28:setWidth(30); obj.rectangle28:setHeight(30); obj.rectangle28:setColor("Black"); obj.rectangle28:setStrokeColor("black"); obj.rectangle28:setStrokeSize(4); obj.rectangle28:setName("rectangle28"); obj.image24 = GUI.fromHandle(_obj_newObject("image")); obj.image24:setParent(obj.layout15); obj.image24:setLeft(005); obj.image24:setTop(45); obj.image24:setWidth(30); obj.image24:setHeight(30); obj.image24:setField("basBADGE110"); obj.image24:setEditable(true); obj.image24:setStyle("proportional"); obj.image24:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image24:setName("image24"); obj.rectangle29 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle29:setParent(obj.layout15); obj.rectangle29:setLeft(000); obj.rectangle29:setTop(90); obj.rectangle29:setWidth(40); obj.rectangle29:setHeight(40); obj.rectangle29:setColor("Red"); obj.rectangle29:setStrokeColor("black"); obj.rectangle29:setStrokeSize(4); obj.rectangle29:setName("rectangle29"); obj.rectangle30 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle30:setParent(obj.layout15); obj.rectangle30:setLeft(005); obj.rectangle30:setTop(95); obj.rectangle30:setWidth(30); obj.rectangle30:setHeight(30); obj.rectangle30:setColor("Black"); obj.rectangle30:setStrokeColor("black"); obj.rectangle30:setStrokeSize(4); obj.rectangle30:setName("rectangle30"); obj.image25 = GUI.fromHandle(_obj_newObject("image")); obj.image25:setParent(obj.layout15); obj.image25:setLeft(005); obj.image25:setTop(90); obj.image25:setWidth(30); obj.image25:setHeight(30); obj.image25:setField("basBADGE111"); obj.image25:setEditable(true); obj.image25:setStyle("proportional"); obj.image25:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image25:setName("image25"); obj.rectangle31 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle31:setParent(obj.layout15); obj.rectangle31:setLeft(000); obj.rectangle31:setTop(135); obj.rectangle31:setWidth(40); obj.rectangle31:setHeight(40); obj.rectangle31:setColor("Red"); obj.rectangle31:setStrokeColor("black"); obj.rectangle31:setStrokeSize(4); obj.rectangle31:setName("rectangle31"); obj.rectangle32 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle32:setParent(obj.layout15); obj.rectangle32:setLeft(005); obj.rectangle32:setTop(140); obj.rectangle32:setWidth(30); obj.rectangle32:setHeight(30); obj.rectangle32:setColor("Black"); obj.rectangle32:setStrokeColor("black"); obj.rectangle32:setStrokeSize(4); obj.rectangle32:setName("rectangle32"); obj.image26 = GUI.fromHandle(_obj_newObject("image")); obj.image26:setParent(obj.layout15); obj.image26:setLeft(005); obj.image26:setTop(135); obj.image26:setWidth(30); obj.image26:setHeight(30); obj.image26:setField("basBADGE112"); obj.image26:setEditable(true); obj.image26:setStyle("proportional"); obj.image26:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image26:setName("image26"); obj.rectangle33 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle33:setParent(obj.layout15); obj.rectangle33:setLeft(000); obj.rectangle33:setTop(180); obj.rectangle33:setWidth(40); obj.rectangle33:setHeight(40); obj.rectangle33:setColor("Red"); obj.rectangle33:setStrokeColor("black"); obj.rectangle33:setStrokeSize(4); obj.rectangle33:setName("rectangle33"); obj.rectangle34 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle34:setParent(obj.layout15); obj.rectangle34:setLeft(005); obj.rectangle34:setTop(185); obj.rectangle34:setWidth(30); obj.rectangle34:setHeight(30); obj.rectangle34:setColor("Black"); obj.rectangle34:setStrokeColor("black"); obj.rectangle34:setStrokeSize(4); obj.rectangle34:setName("rectangle34"); obj.image27 = GUI.fromHandle(_obj_newObject("image")); obj.image27:setParent(obj.layout15); obj.image27:setLeft(005); obj.image27:setTop(180); obj.image27:setWidth(30); obj.image27:setHeight(30); obj.image27:setField("basBADGE113"); obj.image27:setEditable(true); obj.image27:setStyle("proportional"); obj.image27:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image27:setName("image27"); obj.rectangle35 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle35:setParent(obj.layout15); obj.rectangle35:setLeft(000); obj.rectangle35:setTop(225); obj.rectangle35:setWidth(40); obj.rectangle35:setHeight(40); obj.rectangle35:setColor("Red"); obj.rectangle35:setStrokeColor("black"); obj.rectangle35:setStrokeSize(4); obj.rectangle35:setName("rectangle35"); obj.rectangle36 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle36:setParent(obj.layout15); obj.rectangle36:setLeft(005); obj.rectangle36:setTop(230); obj.rectangle36:setWidth(30); obj.rectangle36:setHeight(30); obj.rectangle36:setColor("Black"); obj.rectangle36:setStrokeColor("black"); obj.rectangle36:setStrokeSize(4); obj.rectangle36:setName("rectangle36"); obj.image28 = GUI.fromHandle(_obj_newObject("image")); obj.image28:setParent(obj.layout15); obj.image28:setLeft(005); obj.image28:setTop(225); obj.image28:setWidth(30); obj.image28:setHeight(30); obj.image28:setField("basBADGE114"); obj.image28:setEditable(true); obj.image28:setStyle("proportional"); obj.image28:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image28:setName("image28"); obj.rectangle37 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle37:setParent(obj.layout15); obj.rectangle37:setLeft(000); obj.rectangle37:setTop(270); obj.rectangle37:setWidth(40); obj.rectangle37:setHeight(40); obj.rectangle37:setColor("Red"); obj.rectangle37:setStrokeColor("black"); obj.rectangle37:setStrokeSize(4); obj.rectangle37:setName("rectangle37"); obj.rectangle38 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle38:setParent(obj.layout15); obj.rectangle38:setLeft(005); obj.rectangle38:setTop(275); obj.rectangle38:setWidth(30); obj.rectangle38:setHeight(30); obj.rectangle38:setColor("Black"); obj.rectangle38:setStrokeColor("black"); obj.rectangle38:setStrokeSize(4); obj.rectangle38:setName("rectangle38"); obj.image29 = GUI.fromHandle(_obj_newObject("image")); obj.image29:setParent(obj.layout15); obj.image29:setLeft(005); obj.image29:setTop(270); obj.image29:setWidth(30); obj.image29:setHeight(30); obj.image29:setField("basBADGE115"); obj.image29:setEditable(true); obj.image29:setStyle("proportional"); obj.image29:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image29:setName("image29"); obj.rectangle39 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle39:setParent(obj.layout15); obj.rectangle39:setLeft(000); obj.rectangle39:setTop(315); obj.rectangle39:setWidth(40); obj.rectangle39:setHeight(40); obj.rectangle39:setColor("Red"); obj.rectangle39:setStrokeColor("black"); obj.rectangle39:setStrokeSize(4); obj.rectangle39:setName("rectangle39"); obj.rectangle40 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle40:setParent(obj.layout15); obj.rectangle40:setLeft(005); obj.rectangle40:setTop(320); obj.rectangle40:setWidth(30); obj.rectangle40:setHeight(30); obj.rectangle40:setColor("Black"); obj.rectangle40:setStrokeColor("black"); obj.rectangle40:setStrokeSize(4); obj.rectangle40:setName("rectangle40"); obj.image30 = GUI.fromHandle(_obj_newObject("image")); obj.image30:setParent(obj.layout15); obj.image30:setLeft(005); obj.image30:setTop(315); obj.image30:setWidth(30); obj.image30:setHeight(30); obj.image30:setField("basBADGE116"); obj.image30:setEditable(true); obj.image30:setStyle("proportional"); obj.image30:setHint("Insígnea, Ribbon, Key Item, etc"); obj.image30:setName("image30"); obj.tab2 = GUI.fromHandle(_obj_newObject("tab")); obj.tab2:setParent(obj.tabControl1); obj.tab2:setTitle("Pokemons"); obj.tab2:setName("tab2"); obj.frmPokemon1 = GUI.fromHandle(_obj_newObject("form")); obj.frmPokemon1:setParent(obj.tab2); obj.frmPokemon1:setName("frmPokemon1"); obj.frmPokemon1:setAlign("client"); obj.frmPokemon1:setTheme("dark"); obj.frmPokemon1:setMargins({top=1}); obj.layout16 = GUI.fromHandle(_obj_newObject("layout")); obj.layout16:setParent(obj.frmPokemon1); obj.layout16:setLeft(000); obj.layout16:setTop(000); obj.layout16:setHeight(650); obj.layout16:setWidth(1100); obj.layout16:setName("layout16"); obj.image31 = GUI.fromHandle(_obj_newObject("image")); obj.image31:setParent(obj.layout16); obj.image31:setLeft(000); obj.image31:setTop(000); obj.image31:setHeight(650); obj.image31:setWidth(1100); obj.image31:setSRC("/img/Pokeball.jpg"); obj.image31:setStyle("autoFit"); obj.image31:setName("image31"); obj.scrollBox2 = GUI.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox2:setParent(obj.frmPokemon1); obj.scrollBox2:setAlign("client"); obj.scrollBox2:setName("scrollBox2"); obj.layout17 = GUI.fromHandle(_obj_newObject("layout")); obj.layout17:setParent(obj.scrollBox2); obj.layout17:setAlign("top"); obj.layout17:setHeight(30); obj.layout17:setMargins({bottom=4}); obj.layout17:setName("layout17"); obj.button7 = GUI.fromHandle(_obj_newObject("button")); obj.button7:setParent(obj.layout17); obj.button7:setText("Novo Pokémon"); obj.button7:setWidth(150); obj.button7:setAlign("left"); obj.button7:setName("button7"); obj.button8 = GUI.fromHandle(_obj_newObject("button")); obj.button8:setParent(obj.layout17); obj.button8:setText("Organizar"); obj.button8:setWidth(150); obj.button8:setAlign("left"); obj.button8:setName("button8"); obj.rclListaDosItens = GUI.fromHandle(_obj_newObject("recordList")); obj.rclListaDosItens:setParent(obj.scrollBox2); obj.rclListaDosItens:setName("rclListaDosItens"); obj.rclListaDosItens:setField("campoDosItens"); obj.rclListaDosItens:setTemplateForm("frmItemDaLista"); obj.rclListaDosItens:setAlign("client"); obj.rclListaDosItens:setSelectable(true); obj.boxDetalhesDoItem = GUI.fromHandle(_obj_newObject("dataScopeBox")); obj.boxDetalhesDoItem:setParent(obj.scrollBox2); obj.boxDetalhesDoItem:setName("boxDetalhesDoItem"); obj.boxDetalhesDoItem:setVisible(false); obj.boxDetalhesDoItem:setAlign("right"); obj.boxDetalhesDoItem:setWidth(900); obj.boxDetalhesDoItem:setMargins({left=4, right=8}); obj.tabControl2 = GUI.fromHandle(_obj_newObject("tabControl")); obj.tabControl2:setParent(obj.boxDetalhesDoItem); obj.tabControl2:setLeft(20); obj.tabControl2:setTop(20); obj.tabControl2:setHeight(560); obj.tabControl2:setWidth(890); obj.tabControl2:setName("tabControl2"); obj.tab3 = GUI.fromHandle(_obj_newObject("tab")); obj.tab3:setParent(obj.tabControl2); obj.tab3:setTitle("Geral"); obj.tab3:setName("tab3"); obj.frmPokemon2 = GUI.fromHandle(_obj_newObject("form")); obj.frmPokemon2:setParent(obj.tab3); obj.frmPokemon2:setName("frmPokemon2"); obj.frmPokemon2:setAlign("client"); obj.frmPokemon2:setTheme("dark"); obj.frmPokemon2:setMargins({top=1}); obj.popExemplo = GUI.fromHandle(_obj_newObject("popup")); obj.popExemplo:setParent(obj.frmPokemon2); obj.popExemplo:setName("popExemplo"); obj.popExemplo:setWidth(300); obj.popExemplo:setHeight(200); obj.popExemplo:setBackOpacity(0.4); lfm_setPropAsString(obj.popExemplo, "autoScopeNode", "false"); obj.label54 = GUI.fromHandle(_obj_newObject("label")); obj.label54:setParent(obj.popExemplo); obj.label54:setLeft(0); obj.label54:setTop(5); obj.label54:setWidth(60); obj.label54:setHeight(20); obj.label54:setText("Efeito:"); obj.label54:setHorzTextAlign("center"); obj.label54:setName("label54"); obj.textEditor1 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor1:setParent(obj.popExemplo); obj.textEditor1:setLeft(005); obj.textEditor1:setTop(30); obj.textEditor1:setHeight(165); obj.textEditor1:setWidth(290); obj.textEditor1:setField("Descricao1"); obj.textEditor1:setName("textEditor1"); obj.rectangle41 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle41:setParent(obj.frmPokemon2); obj.rectangle41:setAlign("top"); obj.rectangle41:setColor("black"); obj.rectangle41:setXradius(10); obj.rectangle41:setYradius(10); obj.rectangle41:setHeight(880); obj.rectangle41:setPadding({top=3, left=3, right=3, bottom=3}); obj.rectangle41:setName("rectangle41"); obj.layout18 = GUI.fromHandle(_obj_newObject("layout")); obj.layout18:setParent(obj.rectangle41); obj.layout18:setLeft(005); obj.layout18:setTop(10); obj.layout18:setWidth(800); obj.layout18:setHeight(560); obj.layout18:setName("layout18"); obj.rectangle42 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle42:setParent(obj.layout18); obj.rectangle42:setLeft(00); obj.rectangle42:setTop(00); obj.rectangle42:setWidth(30); obj.rectangle42:setHeight(30); obj.rectangle42:setColor("gray"); obj.rectangle42:setName("rectangle42"); obj.image32 = GUI.fromHandle(_obj_newObject("image")); obj.image32:setParent(obj.layout18); obj.image32:setLeft(00); obj.image32:setTop(00); obj.image32:setWidth(30); obj.image32:setHeight(30); obj.image32:setEditable(true); obj.image32:setField("campoPokebola"); obj.image32:setName("image32"); obj.dataLink27 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink27:setParent(obj.layout18); obj.dataLink27:setField("campoPokebola"); obj.dataLink27:setDefaultValue("https://cdn.bulbagarden.net/upload/9/93/Bag_Pok%C3%A9_Ball_Sprite.png"); obj.dataLink27:setName("dataLink27"); obj.rectangle43 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle43:setParent(obj.layout18); obj.rectangle43:setLeft(35); obj.rectangle43:setTop(00); obj.rectangle43:setWidth(160); obj.rectangle43:setHeight(160); obj.rectangle43:setColor("gray"); obj.rectangle43:setName("rectangle43"); obj.image33 = GUI.fromHandle(_obj_newObject("image")); obj.image33:setParent(obj.layout18); obj.image33:setLeft(35); obj.image33:setTop(00); obj.image33:setWidth(160); obj.image33:setHeight(160); obj.image33:setEditable(true); obj.image33:setField("campoPokemon"); lfm_setPropAsString(obj.image33, "animate", "true"); obj.image33:setName("image33"); obj.image34 = GUI.fromHandle(_obj_newObject("image")); obj.image34:setParent(obj.layout18); obj.image34:setLeft(000); obj.image34:setTop(45); obj.image34:setWidth(30); obj.image34:setHeight(30); obj.image34:setField("basSEX"); obj.image34:setStyle("proportional"); obj.image34:setEditable(false); obj.image34:setName("image34"); obj.button9 = GUI.fromHandle(_obj_newObject("button")); obj.button9:setParent(obj.layout18); obj.button9:setLeft(0); obj.button9:setTop(140); obj.button9:setWidth(15); obj.button9:setHeight(20); obj.button9:setText("E"); obj.button9:setHint("Exportar uma ficha"); obj.button9:setName("button9"); obj.button10 = GUI.fromHandle(_obj_newObject("button")); obj.button10:setParent(obj.layout18); obj.button10:setLeft(17); obj.button10:setTop(140); obj.button10:setWidth(15); obj.button10:setHeight(20); obj.button10:setText("I"); obj.button10:setHint("Importar uma ficha"); obj.button10:setName("button10"); obj.dataLink28 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink28:setParent(obj.layout18); obj.dataLink28:setField("active"); obj.dataLink28:setDefaultValue("true"); obj.dataLink28:setName("dataLink28"); obj.imageCheckBox1 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox1:setParent(obj.layout18); obj.imageCheckBox1:setLeft(00); obj.imageCheckBox1:setTop(90); obj.imageCheckBox1:setHeight(30); obj.imageCheckBox1:setWidth(30); obj.imageCheckBox1:setField("PokShiny"); obj.imageCheckBox1:setHint("Padrão ou Shiny"); obj.imageCheckBox1:setImageChecked("/img/Shiny_ON.png"); obj.imageCheckBox1:setImageUnchecked("/img/Shiny_OFF.png"); obj.imageCheckBox1:setName("imageCheckBox1"); obj.dataLink29 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink29:setParent(obj.layout18); obj.dataLink29:setField("PokShiny"); obj.dataLink29:setDefaultValue("false"); obj.dataLink29:setName("dataLink29"); obj.layout19 = GUI.fromHandle(_obj_newObject("layout")); obj.layout19:setParent(obj.rectangle41); obj.layout19:setLeft(210); obj.layout19:setTop(10); obj.layout19:setWidth(800); obj.layout19:setHeight(800); obj.layout19:setName("layout19"); obj.label55 = GUI.fromHandle(_obj_newObject("label")); obj.label55:setParent(obj.layout19); obj.label55:setLeft(0); obj.label55:setTop(00); obj.label55:setWidth(80); obj.label55:setHeight(20); obj.label55:setText("Número:"); obj.label55:setAutoSize(true); lfm_setPropAsString(obj.label55, "fontStyle", "bold"); obj.label55:setName("label55"); obj.edit76 = GUI.fromHandle(_obj_newObject("edit")); obj.edit76:setParent(obj.layout19); obj.edit76:setLeft(75); obj.edit76:setTop(00); obj.edit76:setWidth(60); obj.edit76:setHeight(20); obj.edit76:setField("campoNumero"); obj.edit76:setHorzTextAlign("center"); obj.edit76:setName("edit76"); obj.comboBox1 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox1:setParent(obj.layout19); obj.comboBox1:setLeft(140); obj.comboBox1:setTop(00); obj.comboBox1:setWidth(110); obj.comboBox1:setHeight(20); obj.comboBox1:setField("campoGenero"); obj.comboBox1:setHorzTextAlign("center"); obj.comboBox1:setItems({'Masculino', 'Feminino', 'Agênero'}); obj.comboBox1:setValues({'1', '2', '3'}); obj.comboBox1:setName("comboBox1"); obj.label56 = GUI.fromHandle(_obj_newObject("label")); obj.label56:setParent(obj.layout19); obj.label56:setLeft(0); obj.label56:setTop(25); obj.label56:setWidth(80); obj.label56:setHeight(20); obj.label56:setText("Espécie:"); obj.label56:setAutoSize(true); lfm_setPropAsString(obj.label56, "fontStyle", "bold"); obj.label56:setName("label56"); obj.edit77 = GUI.fromHandle(_obj_newObject("edit")); obj.edit77:setParent(obj.layout19); obj.edit77:setLeft(75); obj.edit77:setTop(25); obj.edit77:setWidth(175); obj.edit77:setHeight(20); obj.edit77:setField("campoNome"); obj.edit77:setName("edit77"); obj.label57 = GUI.fromHandle(_obj_newObject("label")); obj.label57:setParent(obj.layout19); obj.label57:setLeft(0); obj.label57:setTop(50); obj.label57:setWidth(80); obj.label57:setHeight(20); obj.label57:setText("Apelido:"); obj.label57:setAutoSize(true); lfm_setPropAsString(obj.label57, "fontStyle", "bold"); obj.label57:setName("label57"); obj.edit78 = GUI.fromHandle(_obj_newObject("edit")); obj.edit78:setParent(obj.layout19); obj.edit78:setLeft(75); obj.edit78:setTop(50); obj.edit78:setWidth(175); obj.edit78:setHeight(20); obj.edit78:setField("campoApelido"); obj.edit78:setName("edit78"); obj.label58 = GUI.fromHandle(_obj_newObject("label")); obj.label58:setParent(obj.layout19); obj.label58:setLeft(0); obj.label58:setTop(75); obj.label58:setWidth(80); obj.label58:setHeight(20); obj.label58:setText("Tipo(s):"); obj.label58:setAutoSize(true); lfm_setPropAsString(obj.label58, "fontStyle", "bold"); obj.label58:setName("label58"); obj.comboBox2 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox2:setParent(obj.layout19); obj.comboBox2:setLeft(75); obj.comboBox2:setTop(75); obj.comboBox2:setWidth(85); obj.comboBox2:setHeight(20); obj.comboBox2:setField("campoElem1"); obj.comboBox2:setHorzTextAlign("leading"); obj.comboBox2:setItems({'Normal', 'Fogo', 'Água', 'Elétrico', 'Grama', 'Gelo', 'Lutador', 'Venenoso', 'Terra', 'Voador', 'Psíquico', 'Inseto', 'Rocha', 'Fantasma', 'Dragão', 'Noturno', 'Metálico', 'Fada', ''}); obj.comboBox2:setValues({'1', '2', '3', '4','5','6', '7','8','9','10','11','12','13','14','15','16','17','18','19'}); obj.comboBox2:setName("comboBox2"); obj.comboBox3 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox3:setParent(obj.layout19); obj.comboBox3:setLeft(165); obj.comboBox3:setTop(75); obj.comboBox3:setWidth(85); obj.comboBox3:setHeight(20); obj.comboBox3:setField("campoElem2"); obj.comboBox3:setHorzTextAlign("leading"); obj.comboBox3:setItems({'Normal', 'Fogo', 'Água', 'Elétrico', 'Grama', 'Gelo', 'Lutador', 'Venenoso', 'Terra', 'Voador', 'Psíquico', 'Inseto', 'Rocha', 'Fantasma', 'Dragão', 'Noturno', 'Metálico', 'Fada', ''}); obj.comboBox3:setValues({'1', '2', '3', '4','5','6', '7','8','9','10','11','12','13','14','15','16','17','18','19'}); obj.comboBox3:setName("comboBox3"); obj.dataLink30 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink30:setParent(obj.layout19); obj.dataLink30:setField("campoElem1"); obj.dataLink30:setDefaultValue("19"); obj.dataLink30:setName("dataLink30"); obj.dataLink31 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink31:setParent(obj.layout19); obj.dataLink31:setField("campoElem1"); obj.dataLink31:setDefaultValue("19"); obj.dataLink31:setName("dataLink31"); obj.label59 = GUI.fromHandle(_obj_newObject("label")); obj.label59:setParent(obj.layout19); obj.label59:setLeft(0); obj.label59:setTop(100); obj.label59:setWidth(80); obj.label59:setHeight(20); obj.label59:setText("Natureza:"); obj.label59:setAutoSize(true); lfm_setPropAsString(obj.label59, "fontStyle", "bold"); obj.label59:setName("label59"); obj.edit79 = GUI.fromHandle(_obj_newObject("edit")); obj.edit79:setParent(obj.layout19); obj.edit79:setLeft(75); obj.edit79:setTop(100); obj.edit79:setWidth(175); obj.edit79:setHeight(20); obj.edit79:setField("campoNatureza"); obj.edit79:setName("edit79"); obj.label60 = GUI.fromHandle(_obj_newObject("label")); obj.label60:setParent(obj.layout19); obj.label60:setLeft(95); obj.label60:setTop(125); obj.label60:setWidth(68); obj.label60:setHeight(20); obj.label60:setText("Aumenta"); obj.label60:setAutoSize(true); lfm_setPropAsString(obj.label60, "fontStyle", "bold"); obj.label60:setHorzTextAlign("center"); obj.label60:setName("label60"); obj.label61 = GUI.fromHandle(_obj_newObject("label")); obj.label61:setParent(obj.layout19); obj.label61:setLeft(168); obj.label61:setTop(125); obj.label61:setWidth(68); obj.label61:setHeight(20); obj.label61:setText("Diminui"); obj.label61:setAutoSize(true); lfm_setPropAsString(obj.label61, "fontStyle", "bold"); obj.label61:setHorzTextAlign("center"); obj.label61:setName("label61"); obj.comboBox4 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox4:setParent(obj.layout19); obj.comboBox4:setLeft(95); obj.comboBox4:setTop(145); obj.comboBox4:setWidth(68); obj.comboBox4:setHeight(20); obj.comboBox4:setField("campoNatPlus"); obj.comboBox4:setHorzTextAlign("leading"); obj.comboBox4:setItems({'HP', 'ATK', 'DEF', 'AES', 'DES', 'VEL'}); obj.comboBox4:setValues({'1', '2', '3', '4','5','6'}); obj.comboBox4:setName("comboBox4"); obj.comboBox5 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox5:setParent(obj.layout19); obj.comboBox5:setLeft(168); obj.comboBox5:setTop(145); obj.comboBox5:setWidth(68); obj.comboBox5:setHeight(20); obj.comboBox5:setField("campoNatMinus"); obj.comboBox5:setHorzTextAlign("leading"); obj.comboBox5:setItems({'HP', 'ATK', 'DEF', 'AES', 'DES', 'VEL'}); obj.comboBox5:setValues({'1', '2', '3', '4','5','6'}); obj.comboBox5:setName("comboBox5"); obj.layout20 = GUI.fromHandle(_obj_newObject("layout")); obj.layout20:setParent(obj.rectangle41); obj.layout20:setLeft(500); obj.layout20:setTop(20); obj.layout20:setWidth(800); obj.layout20:setHeight(800); obj.layout20:setName("layout20"); obj.label62 = GUI.fromHandle(_obj_newObject("label")); obj.label62:setParent(obj.layout20); obj.label62:setLeft(0); obj.label62:setTop(000); obj.label62:setWidth(100); obj.label62:setHeight(20); obj.label62:setText("Força:"); obj.label62:setAutoSize(true); lfm_setPropAsString(obj.label62, "fontStyle", "bold"); obj.label62:setName("label62"); obj.edit80 = GUI.fromHandle(_obj_newObject("edit")); obj.edit80:setParent(obj.layout20); obj.edit80:setLeft(95); obj.edit80:setTop(000); obj.edit80:setWidth(60); obj.edit80:setHeight(20); obj.edit80:setField("campoFORC"); obj.edit80:setHorzTextAlign("center"); obj.edit80:setName("edit80"); obj.label63 = GUI.fromHandle(_obj_newObject("label")); obj.label63:setParent(obj.layout20); obj.label63:setLeft(0); obj.label63:setTop(025); obj.label63:setWidth(100); obj.label63:setHeight(20); obj.label63:setText("Inteligência:"); obj.label63:setAutoSize(true); lfm_setPropAsString(obj.label63, "fontStyle", "bold"); obj.label63:setName("label63"); obj.edit81 = GUI.fromHandle(_obj_newObject("edit")); obj.edit81:setParent(obj.layout20); obj.edit81:setLeft(95); obj.edit81:setTop(025); obj.edit81:setWidth(60); obj.edit81:setHeight(20); obj.edit81:setField("campoINTE"); obj.edit81:setHorzTextAlign("center"); obj.edit81:setName("edit81"); obj.label64 = GUI.fromHandle(_obj_newObject("label")); obj.label64:setParent(obj.layout20); obj.label64:setLeft(0); obj.label64:setTop(050); obj.label64:setWidth(100); obj.label64:setHeight(20); obj.label64:setText("Salto:"); obj.label64:setAutoSize(true); lfm_setPropAsString(obj.label64, "fontStyle", "bold"); obj.label64:setName("label64"); obj.edit82 = GUI.fromHandle(_obj_newObject("edit")); obj.edit82:setParent(obj.layout20); obj.edit82:setLeft(95); obj.edit82:setTop(050); obj.edit82:setWidth(60); obj.edit82:setHeight(20); obj.edit82:setField("campoSALTO"); obj.edit82:setHorzTextAlign("center"); obj.edit82:setName("edit82"); obj.label65 = GUI.fromHandle(_obj_newObject("label")); obj.label65:setParent(obj.layout20); obj.label65:setLeft(0); obj.label65:setTop(075); obj.label65:setWidth(100); obj.label65:setHeight(20); obj.label65:setText("Cavar:"); obj.label65:setAutoSize(true); lfm_setPropAsString(obj.label65, "fontStyle", "bold"); obj.label65:setName("label65"); obj.edit83 = GUI.fromHandle(_obj_newObject("edit")); obj.edit83:setParent(obj.layout20); obj.edit83:setLeft(95); obj.edit83:setTop(075); obj.edit83:setWidth(60); obj.edit83:setHeight(20); obj.edit83:setField("campoCAVA"); obj.edit83:setHorzTextAlign("center"); obj.edit83:setName("edit83"); obj.label66 = GUI.fromHandle(_obj_newObject("label")); obj.label66:setParent(obj.layout20); obj.label66:setLeft(0); obj.label66:setTop(100); obj.label66:setWidth(100); obj.label66:setHeight(20); obj.label66:setText("Deslocamento:"); obj.label66:setAutoSize(true); lfm_setPropAsString(obj.label66, "fontStyle", "bold"); obj.label66:setName("label66"); obj.edit84 = GUI.fromHandle(_obj_newObject("edit")); obj.edit84:setParent(obj.layout20); obj.edit84:setLeft(95); obj.edit84:setTop(100); obj.edit84:setWidth(60); obj.edit84:setHeight(20); obj.edit84:setField("campoDESLOC"); obj.edit84:setHorzTextAlign("center"); obj.edit84:setName("edit84"); obj.label67 = GUI.fromHandle(_obj_newObject("label")); obj.label67:setParent(obj.layout20); obj.label67:setLeft(0); obj.label67:setTop(125); obj.label67:setWidth(100); obj.label67:setHeight(20); obj.label67:setText("Natação:"); obj.label67:setAutoSize(true); lfm_setPropAsString(obj.label67, "fontStyle", "bold"); obj.label67:setName("label67"); obj.edit85 = GUI.fromHandle(_obj_newObject("edit")); obj.edit85:setParent(obj.layout20); obj.edit85:setLeft(95); obj.edit85:setTop(125); obj.edit85:setWidth(60); obj.edit85:setHeight(20); obj.edit85:setField("campoNATA"); obj.edit85:setHorzTextAlign("center"); obj.edit85:setName("edit85"); obj.layout21 = GUI.fromHandle(_obj_newObject("layout")); obj.layout21:setParent(obj.rectangle41); obj.layout21:setLeft(700); obj.layout21:setTop(20); obj.layout21:setWidth(800); obj.layout21:setHeight(800); obj.layout21:setName("layout21"); obj.label68 = GUI.fromHandle(_obj_newObject("label")); obj.label68:setParent(obj.layout21); obj.label68:setLeft(000); obj.label68:setTop(00); obj.label68:setWidth(100); obj.label68:setHeight(20); obj.label68:setText("Altura:"); obj.label68:setAutoSize(true); lfm_setPropAsString(obj.label68, "fontStyle", "bold"); obj.label68:setName("label68"); obj.edit86 = GUI.fromHandle(_obj_newObject("edit")); obj.edit86:setParent(obj.layout21); obj.edit86:setLeft(085); obj.edit86:setTop(00); obj.edit86:setWidth(80); obj.edit86:setHeight(20); obj.edit86:setField("campoAltura"); obj.edit86:setHorzTextAlign("center"); obj.edit86:setName("edit86"); obj.label69 = GUI.fromHandle(_obj_newObject("label")); obj.label69:setParent(obj.layout21); obj.label69:setLeft(000); obj.label69:setTop(25); obj.label69:setWidth(100); obj.label69:setHeight(20); obj.label69:setText("Categoria:"); obj.label69:setAutoSize(true); lfm_setPropAsString(obj.label69, "fontStyle", "bold"); obj.label69:setName("label69"); obj.comboBox6 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox6:setParent(obj.layout21); obj.comboBox6:setLeft(085); obj.comboBox6:setTop(25); obj.comboBox6:setWidth(80); obj.comboBox6:setHeight(20); obj.comboBox6:setField("catAltura"); obj.comboBox6:setHorzTextAlign("center"); obj.comboBox6:setItems({'Pequeno', 'Médio', 'Grande', 'Enorme', 'Gigante'}); obj.comboBox6:setValues({'Pequeno', 'Médio', 'Grande', 'Enorme', 'Gigante'}); obj.comboBox6:setName("comboBox6"); obj.label70 = GUI.fromHandle(_obj_newObject("label")); obj.label70:setParent(obj.layout21); obj.label70:setLeft(000); obj.label70:setTop(50); obj.label70:setWidth(100); obj.label70:setHeight(20); obj.label70:setText("Peso:"); obj.label70:setAutoSize(true); lfm_setPropAsString(obj.label70, "fontStyle", "bold"); obj.label70:setName("label70"); obj.edit87 = GUI.fromHandle(_obj_newObject("edit")); obj.edit87:setParent(obj.layout21); obj.edit87:setLeft(085); obj.edit87:setTop(50); obj.edit87:setWidth(80); obj.edit87:setHeight(20); obj.edit87:setField("campoPeso"); obj.edit87:setHorzTextAlign("center"); obj.edit87:setName("edit87"); obj.label71 = GUI.fromHandle(_obj_newObject("label")); obj.label71:setParent(obj.layout21); obj.label71:setLeft(000); obj.label71:setTop(75); obj.label71:setWidth(100); obj.label71:setHeight(20); obj.label71:setText("Categoria:"); obj.label71:setAutoSize(true); lfm_setPropAsString(obj.label71, "fontStyle", "bold"); obj.label71:setName("label71"); obj.comboBox7 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox7:setParent(obj.layout21); obj.comboBox7:setLeft(085); obj.comboBox7:setTop(75); obj.comboBox7:setWidth(80); obj.comboBox7:setHeight(20); obj.comboBox7:setField("catPeso"); obj.comboBox7:setHorzTextAlign("center"); obj.comboBox7:setItems({'Muito Leve', 'Leve', 'Médio', 'Pesado', 'Mui. Pesado', 'Ext. Pesado'}); obj.comboBox7:setValues({'1', '2', '3', '4', '5', '6'}); obj.comboBox7:setName("comboBox7"); obj.label72 = GUI.fromHandle(_obj_newObject("label")); obj.label72:setParent(obj.layout21); obj.label72:setLeft(0); obj.label72:setTop(100); obj.label72:setWidth(100); obj.label72:setHeight(20); obj.label72:setText("Mergulho:"); obj.label72:setAutoSize(true); lfm_setPropAsString(obj.label72, "fontStyle", "bold"); obj.label72:setName("label72"); obj.edit88 = GUI.fromHandle(_obj_newObject("edit")); obj.edit88:setParent(obj.layout21); obj.edit88:setLeft(95); obj.edit88:setTop(100); obj.edit88:setWidth(60); obj.edit88:setHeight(20); obj.edit88:setField("campoMERGU"); obj.edit88:setHorzTextAlign("center"); obj.edit88:setName("edit88"); obj.label73 = GUI.fromHandle(_obj_newObject("label")); obj.label73:setParent(obj.layout21); obj.label73:setLeft(0); obj.label73:setTop(125); obj.label73:setWidth(100); obj.label73:setHeight(20); obj.label73:setText("Voar:"); obj.label73:setAutoSize(true); lfm_setPropAsString(obj.label73, "fontStyle", "bold"); obj.label73:setName("label73"); obj.edit89 = GUI.fromHandle(_obj_newObject("edit")); obj.edit89:setParent(obj.layout21); obj.edit89:setLeft(95); obj.edit89:setTop(125); obj.edit89:setWidth(60); obj.edit89:setHeight(20); obj.edit89:setField("campoVOAR"); obj.edit89:setHorzTextAlign("center"); obj.edit89:setName("edit89"); obj.layout22 = GUI.fromHandle(_obj_newObject("layout")); obj.layout22:setParent(obj.rectangle41); obj.layout22:setLeft(330); obj.layout22:setTop(195); obj.layout22:setWidth(900); obj.layout22:setHeight(800); obj.layout22:setName("layout22"); obj.label74 = GUI.fromHandle(_obj_newObject("label")); obj.label74:setParent(obj.layout22); obj.label74:setLeft(0); obj.label74:setTop(00); obj.label74:setWidth(100); obj.label74:setHeight(20); obj.label74:setText("Nível:"); obj.label74:setAutoSize(true); lfm_setPropAsString(obj.label74, "fontStyle", "bold"); obj.label74:setName("label74"); obj.edit90 = GUI.fromHandle(_obj_newObject("edit")); obj.edit90:setParent(obj.layout22); obj.edit90:setLeft(100); obj.edit90:setTop(0); obj.edit90:setWidth(45); obj.edit90:setHeight(20); obj.edit90:setField("pokeLevel"); obj.edit90:setType("number"); obj.edit90:setHorzTextAlign("center"); obj.edit90:setName("edit90"); obj.label75 = GUI.fromHandle(_obj_newObject("label")); obj.label75:setParent(obj.layout22); obj.label75:setLeft(0); obj.label75:setTop(25); obj.label75:setWidth(100); obj.label75:setHeight(20); obj.label75:setText("Experiência:"); obj.label75:setAutoSize(true); lfm_setPropAsString(obj.label75, "fontStyle", "bold"); obj.label75:setName("label75"); obj.edit91 = GUI.fromHandle(_obj_newObject("edit")); obj.edit91:setParent(obj.layout22); obj.edit91:setLeft(100); obj.edit91:setTop(25); obj.edit91:setWidth(45); obj.edit91:setHeight(20); obj.edit91:setField("campoExpAt"); obj.edit91:setHorzTextAlign("center"); obj.edit91:setName("edit91"); obj.label76 = GUI.fromHandle(_obj_newObject("label")); obj.label76:setParent(obj.layout22); obj.label76:setLeft(147); obj.label76:setTop(25); obj.label76:setHeight(20); obj.label76:setWidth(8); obj.label76:setText("/"); obj.label76:setAutoSize(true); obj.label76:setName("label76"); obj.edit92 = GUI.fromHandle(_obj_newObject("edit")); obj.edit92:setParent(obj.layout22); obj.edit92:setLeft(155); obj.edit92:setTop(25); obj.edit92:setHeight(20); obj.edit92:setWidth(45); obj.edit92:setField("nextLVEXP"); obj.edit92:setHorzTextAlign("center"); obj.edit92:setEnabled(false); obj.edit92:setName("edit92"); obj.label77 = GUI.fromHandle(_obj_newObject("label")); obj.label77:setParent(obj.layout22); obj.label77:setLeft(0); obj.label77:setTop(50); obj.label77:setWidth(100); obj.label77:setHeight(20); obj.label77:setText("Lealdade:"); obj.label77:setAutoSize(true); lfm_setPropAsString(obj.label77, "fontStyle", "bold"); obj.label77:setName("label77"); obj.edit93 = GUI.fromHandle(_obj_newObject("edit")); obj.edit93:setParent(obj.layout22); obj.edit93:setLeft(100); obj.edit93:setTop(50); obj.edit93:setWidth(45); obj.edit93:setHeight(20); obj.edit93:setField("campoLealdade"); obj.edit93:setHorzTextAlign("center"); obj.edit93:setName("edit93"); obj.label78 = GUI.fromHandle(_obj_newObject("label")); obj.label78:setParent(obj.layout22); obj.label78:setLeft(0); obj.label78:setTop(75); obj.label78:setWidth(100); obj.label78:setHeight(20); obj.label78:setText("Vida"); obj.label78:setAutoSize(true); lfm_setPropAsString(obj.label78, "fontStyle", "bold"); obj.label78:setName("label78"); obj.edit94 = GUI.fromHandle(_obj_newObject("edit")); obj.edit94:setParent(obj.layout22); obj.edit94:setLeft(100); obj.edit94:setTop(75); obj.edit94:setHeight(20); obj.edit94:setWidth(45); obj.edit94:setField("baseHPAtual"); obj.edit94:setHorzTextAlign("center"); obj.edit94:setName("edit94"); obj.label79 = GUI.fromHandle(_obj_newObject("label")); obj.label79:setParent(obj.layout22); obj.label79:setLeft(147); obj.label79:setTop(75); obj.label79:setHeight(20); obj.label79:setWidth(8); obj.label79:setText("/"); obj.label79:setAutoSize(true); obj.label79:setName("label79"); obj.edit95 = GUI.fromHandle(_obj_newObject("edit")); obj.edit95:setParent(obj.layout22); obj.edit95:setLeft(155); obj.edit95:setTop(75); obj.edit95:setHeight(20); obj.edit95:setWidth(45); obj.edit95:setField("baseHPMAX"); obj.edit95:setHorzTextAlign("center"); obj.edit95:setEnabled(false); obj.edit95:setName("edit95"); obj.layout23 = GUI.fromHandle(_obj_newObject("layout")); obj.layout23:setParent(obj.rectangle41); obj.layout23:setLeft(610); obj.layout23:setTop(180); obj.layout23:setHeight(320); obj.layout23:setWidth(420); obj.layout23:setName("layout23"); obj.label80 = GUI.fromHandle(_obj_newObject("label")); obj.label80:setParent(obj.layout23); obj.label80:setLeft(75); obj.label80:setTop(000); obj.label80:setHeight(20); obj.label80:setWidth(30); obj.label80:setText("Tot."); obj.label80:setAutoSize(true); obj.label80:setName("label80"); obj.label81 = GUI.fromHandle(_obj_newObject("label")); obj.label81:setParent(obj.layout23); obj.label81:setLeft(120); obj.label81:setTop(000); obj.label81:setHeight(20); obj.label81:setWidth(30); obj.label81:setText("Bôn."); obj.label81:setAutoSize(true); obj.label81:setName("label81"); obj.label82 = GUI.fromHandle(_obj_newObject("label")); obj.label82:setParent(obj.layout23); obj.label82:setLeft(000); obj.label82:setTop(025); obj.label82:setHeight(20); obj.label82:setWidth(120); obj.label82:setText("Eva. Física"); obj.label82:setAutoSize(true); lfm_setPropAsString(obj.label82, "fontStyle", "bold"); obj.label82:setName("label82"); obj.label83 = GUI.fromHandle(_obj_newObject("label")); obj.label83:setParent(obj.layout23); obj.label83:setLeft(000); obj.label83:setTop(025); obj.label83:setHeight(20); obj.label83:setWidth(120); obj.label83:setText("Eva. Física"); obj.label83:setAutoSize(true); lfm_setPropAsString(obj.label83, "fontStyle", "bold"); obj.label83:setName("label83"); obj.edit96 = GUI.fromHandle(_obj_newObject("edit")); obj.edit96:setParent(obj.layout23); obj.edit96:setLeft(85); obj.edit96:setTop(025); obj.edit96:setHeight(20); obj.edit96:setWidth(30); obj.edit96:setField("campoEFIS"); obj.edit96:setHorzTextAlign("center"); obj.edit96:setType("number"); obj.edit96:setEnabled(false); obj.edit96:setName("edit96"); obj.edit97 = GUI.fromHandle(_obj_newObject("edit")); obj.edit97:setParent(obj.layout23); obj.edit97:setLeft(120); obj.edit97:setTop(025); obj.edit97:setHeight(20); obj.edit97:setWidth(30); obj.edit97:setField("pok_bonEVAF"); obj.edit97:setHorzTextAlign("center"); obj.edit97:setType("number"); obj.edit97:setName("edit97"); obj.label84 = GUI.fromHandle(_obj_newObject("label")); obj.label84:setParent(obj.layout23); obj.label84:setLeft(000); obj.label84:setTop(050); obj.label84:setHeight(20); obj.label84:setWidth(120); obj.label84:setText("Eva. Especial"); obj.label84:setAutoSize(true); lfm_setPropAsString(obj.label84, "fontStyle", "bold"); obj.label84:setName("label84"); obj.edit98 = GUI.fromHandle(_obj_newObject("edit")); obj.edit98:setParent(obj.layout23); obj.edit98:setLeft(85); obj.edit98:setTop(050); obj.edit98:setHeight(20); obj.edit98:setWidth(30); obj.edit98:setField("campoEESP"); obj.edit98:setHorzTextAlign("center"); obj.edit98:setType("number"); obj.edit98:setEnabled(false); obj.edit98:setName("edit98"); obj.edit99 = GUI.fromHandle(_obj_newObject("edit")); obj.edit99:setParent(obj.layout23); obj.edit99:setLeft(120); obj.edit99:setTop(050); obj.edit99:setHeight(20); obj.edit99:setWidth(30); obj.edit99:setField("pok_bonEVAE"); obj.edit99:setHorzTextAlign("center"); obj.edit99:setType("number"); obj.edit99:setName("edit99"); obj.label85 = GUI.fromHandle(_obj_newObject("label")); obj.label85:setParent(obj.layout23); obj.label85:setLeft(000); obj.label85:setTop(075); obj.label85:setHeight(20); obj.label85:setWidth(120); obj.label85:setText("Eva. Veloz"); obj.label85:setAutoSize(true); lfm_setPropAsString(obj.label85, "fontStyle", "bold"); obj.label85:setName("label85"); obj.edit100 = GUI.fromHandle(_obj_newObject("edit")); obj.edit100:setParent(obj.layout23); obj.edit100:setLeft(85); obj.edit100:setTop(075); obj.edit100:setHeight(20); obj.edit100:setWidth(30); obj.edit100:setField("campoEVEL"); obj.edit100:setHorzTextAlign("center"); obj.edit100:setType("number"); obj.edit100:setEnabled(false); obj.edit100:setName("edit100"); obj.edit101 = GUI.fromHandle(_obj_newObject("edit")); obj.edit101:setParent(obj.layout23); obj.edit101:setLeft(120); obj.edit101:setTop(075); obj.edit101:setHeight(20); obj.edit101:setWidth(30); obj.edit101:setField("Pok_bonEVAV"); obj.edit101:setHorzTextAlign("center"); obj.edit101:setType("number"); obj.edit101:setName("edit101"); obj.label86 = GUI.fromHandle(_obj_newObject("label")); obj.label86:setParent(obj.layout23); obj.label86:setLeft(000); obj.label86:setTop(100); obj.label86:setHeight(20); obj.label86:setWidth(120); obj.label86:setText("Iniciativa"); obj.label86:setAutoSize(true); lfm_setPropAsString(obj.label86, "fontStyle", "bold"); obj.label86:setName("label86"); obj.edit102 = GUI.fromHandle(_obj_newObject("edit")); obj.edit102:setParent(obj.layout23); obj.edit102:setLeft(85); obj.edit102:setTop(100); obj.edit102:setHeight(20); obj.edit102:setWidth(30); obj.edit102:setField("pok_INI"); obj.edit102:setHorzTextAlign("center"); obj.edit102:setType("number"); obj.edit102:setEnabled(false); obj.edit102:setName("edit102"); obj.edit103 = GUI.fromHandle(_obj_newObject("edit")); obj.edit103:setParent(obj.layout23); obj.edit103:setLeft(120); obj.edit103:setTop(100); obj.edit103:setHeight(20); obj.edit103:setWidth(30); obj.edit103:setField("pok_bonINI"); obj.edit103:setHorzTextAlign("center"); obj.edit103:setType("number"); obj.edit103:setName("edit103"); obj.layout24 = GUI.fromHandle(_obj_newObject("layout")); obj.layout24:setParent(obj.rectangle41); obj.layout24:setLeft(10); obj.layout24:setTop(320); obj.layout24:setHeight(600); obj.layout24:setWidth(800); obj.layout24:setName("layout24"); obj.label87 = GUI.fromHandle(_obj_newObject("label")); obj.label87:setParent(obj.layout24); obj.label87:setLeft(000); obj.label87:setTop(000); obj.label87:setHeight(20); obj.label87:setWidth(30); obj.label87:setText("R.B."); obj.label87:setAutoSize(true); obj.label87:setHorzTextAlign("center"); obj.label87:setName("label87"); obj.label88 = GUI.fromHandle(_obj_newObject("label")); obj.label88:setParent(obj.layout24); obj.label88:setLeft(035); obj.label88:setTop(000); obj.label88:setHeight(20); obj.label88:setWidth(100); obj.label88:setText("Atributo"); obj.label88:setAutoSize(true); obj.label88:setHorzTextAlign("center"); lfm_setPropAsString(obj.label88, "fontStyle", "bold"); obj.label88:setName("label88"); obj.label89 = GUI.fromHandle(_obj_newObject("label")); obj.label89:setParent(obj.layout24); obj.label89:setLeft(140); obj.label89:setTop(000); obj.label89:setHeight(20); obj.label89:setWidth(30); obj.label89:setText("Total"); obj.label89:setAutoSize(true); obj.label89:setHorzTextAlign("center"); obj.label89:setName("label89"); obj.label90 = GUI.fromHandle(_obj_newObject("label")); obj.label90:setParent(obj.layout24); obj.label90:setLeft(185); obj.label90:setTop(000); obj.label90:setHeight(20); obj.label90:setWidth(30); obj.label90:setText("Base"); obj.label90:setAutoSize(true); obj.label90:setHorzTextAlign("center"); obj.label90:setName("label90"); obj.label91 = GUI.fromHandle(_obj_newObject("label")); obj.label91:setParent(obj.layout24); obj.label91:setLeft(230); obj.label91:setTop(000); obj.label91:setHeight(20); obj.label91:setWidth(30); obj.label91:setText("Nível"); obj.label91:setAutoSize(true); obj.label91:setHorzTextAlign("center"); obj.label91:setName("label91"); obj.label92 = GUI.fromHandle(_obj_newObject("label")); obj.label92:setParent(obj.layout24); obj.label92:setLeft(275); obj.label92:setTop(000); obj.label92:setHeight(20); obj.label92:setWidth(30); obj.label92:setText("Bôn"); obj.label92:setAutoSize(true); obj.label92:setHorzTextAlign("center"); obj.label92:setName("label92"); obj.label93 = GUI.fromHandle(_obj_newObject("label")); obj.label93:setParent(obj.layout24); obj.label93:setLeft(320); obj.label93:setTop(000); obj.label93:setHeight(20); obj.label93:setWidth(30); obj.label93:setText("Vit."); obj.label93:setAutoSize(true); obj.label93:setHorzTextAlign("center"); obj.label93:setName("label93"); obj.imageCheckBox2 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox2:setParent(obj.layout24); obj.imageCheckBox2:setLeft(370); obj.imageCheckBox2:setTop(000); obj.imageCheckBox2:setHeight(40); obj.imageCheckBox2:setWidth(20); obj.imageCheckBox2:setField("MegaEvo"); obj.imageCheckBox2:setHint("Normal ou Mega"); obj.imageCheckBox2:setImageChecked("/img/Mega_ON.png"); obj.imageCheckBox2:setImageUnchecked("/img/Mega_OFF.png"); obj.imageCheckBox2:setName("imageCheckBox2"); obj.edit104 = GUI.fromHandle(_obj_newObject("edit")); obj.edit104:setParent(obj.layout24); obj.edit104:setLeft(000); obj.edit104:setTop(025); obj.edit104:setHeight(20); obj.edit104:setWidth(30); obj.edit104:setField("Vida_Pri"); obj.edit104:setHorzTextAlign("center"); obj.edit104:setType("number"); obj.edit104:setName("edit104"); obj.label94 = GUI.fromHandle(_obj_newObject("label")); obj.label94:setParent(obj.layout24); obj.label94:setLeft(035); obj.label94:setTop(025); obj.label94:setHeight(20); obj.label94:setWidth(100); obj.label94:setText("HP"); obj.label94:setAutoSize(true); lfm_setPropAsString(obj.label94, "fontStyle", "bold"); obj.label94:setName("label94"); obj.edit105 = GUI.fromHandle(_obj_newObject("edit")); obj.edit105:setParent(obj.layout24); obj.edit105:setLeft(140); obj.edit105:setTop(025); obj.edit105:setHeight(20); obj.edit105:setWidth(30); obj.edit105:setField("Vida_Form1"); obj.edit105:setHorzTextAlign("center"); obj.edit105:setType("number"); obj.edit105:setEnabled(false); obj.edit105:setName("edit105"); obj.edit106 = GUI.fromHandle(_obj_newObject("edit")); obj.edit106:setParent(obj.layout24); obj.edit106:setLeft(185); obj.edit106:setTop(025); obj.edit106:setHeight(20); obj.edit106:setWidth(30); obj.edit106:setField("Vida_Base1"); obj.edit106:setHorzTextAlign("center"); obj.edit106:setType("number"); obj.edit106:setName("edit106"); obj.edit107 = GUI.fromHandle(_obj_newObject("edit")); obj.edit107:setParent(obj.layout24); obj.edit107:setLeft(230); obj.edit107:setTop(025); obj.edit107:setHeight(20); obj.edit107:setWidth(30); obj.edit107:setField("Vida_Nivel"); obj.edit107:setHorzTextAlign("center"); obj.edit107:setType("number"); obj.edit107:setName("edit107"); obj.edit108 = GUI.fromHandle(_obj_newObject("edit")); obj.edit108:setParent(obj.layout24); obj.edit108:setLeft(275); obj.edit108:setTop(025); obj.edit108:setHeight(20); obj.edit108:setWidth(30); obj.edit108:setField("Vida_Bon1"); obj.edit108:setHorzTextAlign("center"); obj.edit108:setType("number"); obj.edit108:setName("edit108"); obj.edit109 = GUI.fromHandle(_obj_newObject("edit")); obj.edit109:setParent(obj.layout24); obj.edit109:setLeft(320); obj.edit109:setTop(025); obj.edit109:setHeight(20); obj.edit109:setWidth(30); obj.edit109:setField("Vida_Vit"); obj.edit109:setHorzTextAlign("center"); obj.edit109:setType("number"); obj.edit109:setName("edit109"); obj.edit110 = GUI.fromHandle(_obj_newObject("edit")); obj.edit110:setParent(obj.layout24); obj.edit110:setLeft(000); obj.edit110:setTop(050); obj.edit110:setHeight(20); obj.edit110:setWidth(30); obj.edit110:setField("Ataque_Pri"); obj.edit110:setHorzTextAlign("center"); obj.edit110:setType("number"); obj.edit110:setName("edit110"); obj.label95 = GUI.fromHandle(_obj_newObject("label")); obj.label95:setParent(obj.layout24); obj.label95:setLeft(035); obj.label95:setTop(050); obj.label95:setHeight(20); obj.label95:setWidth(100); obj.label95:setText("Ataque"); obj.label95:setAutoSize(true); lfm_setPropAsString(obj.label95, "fontStyle", "bold"); obj.label95:setName("label95"); obj.edit111 = GUI.fromHandle(_obj_newObject("edit")); obj.edit111:setParent(obj.layout24); obj.edit111:setLeft(140); obj.edit111:setTop(050); obj.edit111:setHeight(20); obj.edit111:setWidth(30); obj.edit111:setField("Ataque_Form1"); obj.edit111:setHorzTextAlign("center"); obj.edit111:setType("number"); obj.edit111:setEnabled(false); obj.edit111:setName("edit111"); obj.edit112 = GUI.fromHandle(_obj_newObject("edit")); obj.edit112:setParent(obj.layout24); obj.edit112:setLeft(185); obj.edit112:setTop(050); obj.edit112:setHeight(20); obj.edit112:setWidth(30); obj.edit112:setField("Ataque_Base1"); obj.edit112:setHorzTextAlign("center"); obj.edit112:setType("number"); obj.edit112:setName("edit112"); obj.edit113 = GUI.fromHandle(_obj_newObject("edit")); obj.edit113:setParent(obj.layout24); obj.edit113:setLeft(230); obj.edit113:setTop(050); obj.edit113:setHeight(20); obj.edit113:setWidth(30); obj.edit113:setField("Ataque_Nivel"); obj.edit113:setHorzTextAlign("center"); obj.edit113:setType("number"); obj.edit113:setName("edit113"); obj.edit114 = GUI.fromHandle(_obj_newObject("edit")); obj.edit114:setParent(obj.layout24); obj.edit114:setLeft(275); obj.edit114:setTop(050); obj.edit114:setHeight(20); obj.edit114:setWidth(30); obj.edit114:setField("Ataque_Bon1"); obj.edit114:setHorzTextAlign("center"); obj.edit114:setType("number"); obj.edit114:setName("edit114"); obj.edit115 = GUI.fromHandle(_obj_newObject("edit")); obj.edit115:setParent(obj.layout24); obj.edit115:setLeft(320); obj.edit115:setTop(050); obj.edit115:setHeight(20); obj.edit115:setWidth(30); obj.edit115:setField("Ataque_Vit"); obj.edit115:setHorzTextAlign("center"); obj.edit115:setType("number"); obj.edit115:setName("edit115"); obj.edit116 = GUI.fromHandle(_obj_newObject("edit")); obj.edit116:setParent(obj.layout24); obj.edit116:setLeft(365); obj.edit116:setTop(050); obj.edit116:setHeight(20); obj.edit116:setWidth(30); obj.edit116:setField("Ataque_Bon2"); obj.edit116:setHorzTextAlign("center"); obj.edit116:setType("number"); obj.edit116:setName("edit116"); obj.comboBox8 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox8:setParent(obj.layout24); obj.comboBox8:setLeft(400); obj.comboBox8:setTop(050); obj.comboBox8:setHeight(20); obj.comboBox8:setWidth(45); obj.comboBox8:setField("Ataque_edc"); obj.comboBox8:setHorzTextAlign("center"); obj.comboBox8:setItems({'-6', '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6'}); obj.comboBox8:setValues({'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'}); obj.comboBox8:setName("comboBox8"); obj.dataLink32 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink32:setParent(obj.layout24); obj.dataLink32:setField("Ataque_edc"); obj.dataLink32:setDefaultValue("7"); obj.dataLink32:setName("dataLink32"); obj.edit117 = GUI.fromHandle(_obj_newObject("edit")); obj.edit117:setParent(obj.layout24); obj.edit117:setLeft(000); obj.edit117:setTop(075); obj.edit117:setHeight(20); obj.edit117:setWidth(30); obj.edit117:setField("Defesa_Pri"); obj.edit117:setHorzTextAlign("center"); obj.edit117:setType("number"); obj.edit117:setName("edit117"); obj.label96 = GUI.fromHandle(_obj_newObject("label")); obj.label96:setParent(obj.layout24); obj.label96:setLeft(035); obj.label96:setTop(075); obj.label96:setHeight(20); obj.label96:setWidth(100); obj.label96:setText("Defesa"); obj.label96:setAutoSize(true); lfm_setPropAsString(obj.label96, "fontStyle", "bold"); obj.label96:setName("label96"); obj.edit118 = GUI.fromHandle(_obj_newObject("edit")); obj.edit118:setParent(obj.layout24); obj.edit118:setLeft(140); obj.edit118:setTop(075); obj.edit118:setHeight(20); obj.edit118:setWidth(30); obj.edit118:setField("Defesa_Form1"); obj.edit118:setHorzTextAlign("center"); obj.edit118:setType("number"); obj.edit118:setEnabled(false); obj.edit118:setName("edit118"); obj.edit119 = GUI.fromHandle(_obj_newObject("edit")); obj.edit119:setParent(obj.layout24); obj.edit119:setLeft(185); obj.edit119:setTop(075); obj.edit119:setHeight(20); obj.edit119:setWidth(30); obj.edit119:setField("Defesa_Base1"); obj.edit119:setHorzTextAlign("center"); obj.edit119:setType("number"); obj.edit119:setName("edit119"); obj.edit120 = GUI.fromHandle(_obj_newObject("edit")); obj.edit120:setParent(obj.layout24); obj.edit120:setLeft(230); obj.edit120:setTop(075); obj.edit120:setHeight(20); obj.edit120:setWidth(30); obj.edit120:setField("Defesa_Nivel"); obj.edit120:setHorzTextAlign("center"); obj.edit120:setType("number"); obj.edit120:setName("edit120"); obj.edit121 = GUI.fromHandle(_obj_newObject("edit")); obj.edit121:setParent(obj.layout24); obj.edit121:setLeft(275); obj.edit121:setTop(075); obj.edit121:setHeight(20); obj.edit121:setWidth(30); obj.edit121:setField("Defesa_Bon1"); obj.edit121:setHorzTextAlign("center"); obj.edit121:setType("number"); obj.edit121:setName("edit121"); obj.edit122 = GUI.fromHandle(_obj_newObject("edit")); obj.edit122:setParent(obj.layout24); obj.edit122:setLeft(320); obj.edit122:setTop(075); obj.edit122:setHeight(20); obj.edit122:setWidth(30); obj.edit122:setField("Defesa_Vit"); obj.edit122:setHorzTextAlign("center"); obj.edit122:setType("number"); obj.edit122:setName("edit122"); obj.edit123 = GUI.fromHandle(_obj_newObject("edit")); obj.edit123:setParent(obj.layout24); obj.edit123:setLeft(365); obj.edit123:setTop(075); obj.edit123:setHeight(20); obj.edit123:setWidth(30); obj.edit123:setField("Defesa_Bon2"); obj.edit123:setHorzTextAlign("center"); obj.edit123:setType("number"); obj.edit123:setName("edit123"); obj.comboBox9 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox9:setParent(obj.layout24); obj.comboBox9:setLeft(400); obj.comboBox9:setTop(075); obj.comboBox9:setHeight(20); obj.comboBox9:setWidth(45); obj.comboBox9:setField("Defesa_edc"); obj.comboBox9:setHorzTextAlign("center"); obj.comboBox9:setItems({'-6', '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6'}); obj.comboBox9:setValues({'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'}); obj.comboBox9:setName("comboBox9"); obj.dataLink33 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink33:setParent(obj.layout24); obj.dataLink33:setField("Defesa_edc"); obj.dataLink33:setDefaultValue("7"); obj.dataLink33:setName("dataLink33"); obj.edit124 = GUI.fromHandle(_obj_newObject("edit")); obj.edit124:setParent(obj.layout24); obj.edit124:setLeft(000); obj.edit124:setTop(100); obj.edit124:setHeight(20); obj.edit124:setWidth(30); obj.edit124:setField("AtaqueEsp_Pri"); obj.edit124:setHorzTextAlign("center"); obj.edit124:setType("number"); obj.edit124:setName("edit124"); obj.label97 = GUI.fromHandle(_obj_newObject("label")); obj.label97:setParent(obj.layout24); obj.label97:setLeft(035); obj.label97:setTop(100); obj.label97:setHeight(20); obj.label97:setWidth(100); obj.label97:setText("Ataque Especial"); obj.label97:setAutoSize(true); lfm_setPropAsString(obj.label97, "fontStyle", "bold"); obj.label97:setName("label97"); obj.edit125 = GUI.fromHandle(_obj_newObject("edit")); obj.edit125:setParent(obj.layout24); obj.edit125:setLeft(140); obj.edit125:setTop(100); obj.edit125:setHeight(20); obj.edit125:setWidth(30); obj.edit125:setField("AtaqueEsp_Form1"); obj.edit125:setHorzTextAlign("center"); obj.edit125:setType("number"); obj.edit125:setEnabled(false); obj.edit125:setName("edit125"); obj.edit126 = GUI.fromHandle(_obj_newObject("edit")); obj.edit126:setParent(obj.layout24); obj.edit126:setLeft(185); obj.edit126:setTop(100); obj.edit126:setHeight(20); obj.edit126:setWidth(30); obj.edit126:setField("AtaqueEsp_Base1"); obj.edit126:setHorzTextAlign("center"); obj.edit126:setType("number"); obj.edit126:setName("edit126"); obj.edit127 = GUI.fromHandle(_obj_newObject("edit")); obj.edit127:setParent(obj.layout24); obj.edit127:setLeft(230); obj.edit127:setTop(100); obj.edit127:setHeight(20); obj.edit127:setWidth(30); obj.edit127:setField("AtaqueEsp_Nivel"); obj.edit127:setHorzTextAlign("center"); obj.edit127:setType("number"); obj.edit127:setName("edit127"); obj.edit128 = GUI.fromHandle(_obj_newObject("edit")); obj.edit128:setParent(obj.layout24); obj.edit128:setLeft(275); obj.edit128:setTop(100); obj.edit128:setHeight(20); obj.edit128:setWidth(30); obj.edit128:setField("AtaqueEsp_Bon1"); obj.edit128:setHorzTextAlign("center"); obj.edit128:setType("number"); obj.edit128:setName("edit128"); obj.edit129 = GUI.fromHandle(_obj_newObject("edit")); obj.edit129:setParent(obj.layout24); obj.edit129:setLeft(320); obj.edit129:setTop(100); obj.edit129:setHeight(20); obj.edit129:setWidth(30); obj.edit129:setField("AtaqueEsp_Vit"); obj.edit129:setHorzTextAlign("center"); obj.edit129:setType("number"); obj.edit129:setName("edit129"); obj.edit130 = GUI.fromHandle(_obj_newObject("edit")); obj.edit130:setParent(obj.layout24); obj.edit130:setLeft(365); obj.edit130:setTop(100); obj.edit130:setHeight(20); obj.edit130:setWidth(30); obj.edit130:setField("AtaqueEsp_Bon2"); obj.edit130:setHorzTextAlign("center"); obj.edit130:setType("number"); obj.edit130:setName("edit130"); obj.comboBox10 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox10:setParent(obj.layout24); obj.comboBox10:setLeft(400); obj.comboBox10:setTop(100); obj.comboBox10:setHeight(20); obj.comboBox10:setWidth(45); obj.comboBox10:setField("AtaqueEsp_edc"); obj.comboBox10:setHorzTextAlign("center"); obj.comboBox10:setItems({'-6', '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6'}); obj.comboBox10:setValues({'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'}); obj.comboBox10:setName("comboBox10"); obj.dataLink34 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink34:setParent(obj.layout24); obj.dataLink34:setField("AtaqueEsp_edc"); obj.dataLink34:setDefaultValue("7"); obj.dataLink34:setName("dataLink34"); obj.edit131 = GUI.fromHandle(_obj_newObject("edit")); obj.edit131:setParent(obj.layout24); obj.edit131:setLeft(000); obj.edit131:setTop(125); obj.edit131:setHeight(20); obj.edit131:setWidth(30); obj.edit131:setField("DefesaEsp_Pri"); obj.edit131:setHorzTextAlign("center"); obj.edit131:setType("number"); obj.edit131:setName("edit131"); obj.label98 = GUI.fromHandle(_obj_newObject("label")); obj.label98:setParent(obj.layout24); obj.label98:setLeft(035); obj.label98:setTop(125); obj.label98:setHeight(20); obj.label98:setWidth(100); obj.label98:setText("Defesa Especial"); obj.label98:setAutoSize(true); lfm_setPropAsString(obj.label98, "fontStyle", "bold"); obj.label98:setName("label98"); obj.edit132 = GUI.fromHandle(_obj_newObject("edit")); obj.edit132:setParent(obj.layout24); obj.edit132:setLeft(140); obj.edit132:setTop(125); obj.edit132:setHeight(20); obj.edit132:setWidth(30); obj.edit132:setField("DefesaEsp_Form1"); obj.edit132:setHorzTextAlign("center"); obj.edit132:setType("number"); obj.edit132:setEnabled(false); obj.edit132:setName("edit132"); obj.edit133 = GUI.fromHandle(_obj_newObject("edit")); obj.edit133:setParent(obj.layout24); obj.edit133:setLeft(185); obj.edit133:setTop(125); obj.edit133:setHeight(20); obj.edit133:setWidth(30); obj.edit133:setField("DefesaEsp_Base1"); obj.edit133:setHorzTextAlign("center"); obj.edit133:setType("number"); obj.edit133:setName("edit133"); obj.edit134 = GUI.fromHandle(_obj_newObject("edit")); obj.edit134:setParent(obj.layout24); obj.edit134:setLeft(230); obj.edit134:setTop(125); obj.edit134:setHeight(20); obj.edit134:setWidth(30); obj.edit134:setField("DefesaEsp_Nivel"); obj.edit134:setHorzTextAlign("center"); obj.edit134:setType("number"); obj.edit134:setName("edit134"); obj.edit135 = GUI.fromHandle(_obj_newObject("edit")); obj.edit135:setParent(obj.layout24); obj.edit135:setLeft(275); obj.edit135:setTop(125); obj.edit135:setHeight(20); obj.edit135:setWidth(30); obj.edit135:setField("DefesaEsp_Bon1"); obj.edit135:setHorzTextAlign("center"); obj.edit135:setType("number"); obj.edit135:setName("edit135"); obj.edit136 = GUI.fromHandle(_obj_newObject("edit")); obj.edit136:setParent(obj.layout24); obj.edit136:setLeft(320); obj.edit136:setTop(125); obj.edit136:setHeight(20); obj.edit136:setWidth(30); obj.edit136:setField("DefesaEsp_Vit"); obj.edit136:setHorzTextAlign("center"); obj.edit136:setType("number"); obj.edit136:setName("edit136"); obj.edit137 = GUI.fromHandle(_obj_newObject("edit")); obj.edit137:setParent(obj.layout24); obj.edit137:setLeft(365); obj.edit137:setTop(125); obj.edit137:setHeight(20); obj.edit137:setWidth(30); obj.edit137:setField("DefesaEsp_Bon2"); obj.edit137:setHorzTextAlign("center"); obj.edit137:setType("number"); obj.edit137:setName("edit137"); obj.comboBox11 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox11:setParent(obj.layout24); obj.comboBox11:setLeft(400); obj.comboBox11:setTop(125); obj.comboBox11:setHeight(20); obj.comboBox11:setWidth(45); obj.comboBox11:setField("DefesaEsp_edc"); obj.comboBox11:setHorzTextAlign("center"); obj.comboBox11:setItems({'-6', '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6'}); obj.comboBox11:setValues({'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'}); obj.comboBox11:setName("comboBox11"); obj.dataLink35 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink35:setParent(obj.layout24); obj.dataLink35:setField("DefesaEsp_edc"); obj.dataLink35:setDefaultValue("7"); obj.dataLink35:setName("dataLink35"); obj.edit138 = GUI.fromHandle(_obj_newObject("edit")); obj.edit138:setParent(obj.layout24); obj.edit138:setLeft(000); obj.edit138:setTop(150); obj.edit138:setHeight(20); obj.edit138:setWidth(30); obj.edit138:setField("Velocidade_Pri"); obj.edit138:setHorzTextAlign("center"); obj.edit138:setType("number"); obj.edit138:setName("edit138"); obj.label99 = GUI.fromHandle(_obj_newObject("label")); obj.label99:setParent(obj.layout24); obj.label99:setLeft(035); obj.label99:setTop(150); obj.label99:setHeight(20); obj.label99:setWidth(100); obj.label99:setText("Velocidade"); obj.label99:setAutoSize(true); lfm_setPropAsString(obj.label99, "fontStyle", "bold"); obj.label99:setName("label99"); obj.edit139 = GUI.fromHandle(_obj_newObject("edit")); obj.edit139:setParent(obj.layout24); obj.edit139:setLeft(140); obj.edit139:setTop(150); obj.edit139:setHeight(20); obj.edit139:setWidth(30); obj.edit139:setField("Velocidade_Form1"); obj.edit139:setHorzTextAlign("center"); obj.edit139:setType("number"); obj.edit139:setEnabled(false); obj.edit139:setName("edit139"); obj.edit140 = GUI.fromHandle(_obj_newObject("edit")); obj.edit140:setParent(obj.layout24); obj.edit140:setLeft(185); obj.edit140:setTop(150); obj.edit140:setHeight(20); obj.edit140:setWidth(30); obj.edit140:setField("Velocidade_Base1"); obj.edit140:setHorzTextAlign("center"); obj.edit140:setType("number"); obj.edit140:setName("edit140"); obj.edit141 = GUI.fromHandle(_obj_newObject("edit")); obj.edit141:setParent(obj.layout24); obj.edit141:setLeft(230); obj.edit141:setTop(150); obj.edit141:setHeight(20); obj.edit141:setWidth(30); obj.edit141:setField("Velocidade_Nivel"); obj.edit141:setHorzTextAlign("center"); obj.edit141:setType("number"); obj.edit141:setName("edit141"); obj.edit142 = GUI.fromHandle(_obj_newObject("edit")); obj.edit142:setParent(obj.layout24); obj.edit142:setLeft(275); obj.edit142:setTop(150); obj.edit142:setHeight(20); obj.edit142:setWidth(30); obj.edit142:setField("Velocidade_Bon1"); obj.edit142:setHorzTextAlign("center"); obj.edit142:setType("number"); obj.edit142:setName("edit142"); obj.edit143 = GUI.fromHandle(_obj_newObject("edit")); obj.edit143:setParent(obj.layout24); obj.edit143:setLeft(320); obj.edit143:setTop(150); obj.edit143:setHeight(20); obj.edit143:setWidth(30); obj.edit143:setField("Velocidade_Vit"); obj.edit143:setHorzTextAlign("center"); obj.edit143:setType("number"); obj.edit143:setName("edit143"); obj.edit144 = GUI.fromHandle(_obj_newObject("edit")); obj.edit144:setParent(obj.layout24); obj.edit144:setLeft(365); obj.edit144:setTop(150); obj.edit144:setHeight(20); obj.edit144:setWidth(30); obj.edit144:setField("Velocidade_Bon2"); obj.edit144:setHorzTextAlign("center"); obj.edit144:setType("number"); obj.edit144:setName("edit144"); obj.comboBox12 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox12:setParent(obj.layout24); obj.comboBox12:setLeft(400); obj.comboBox12:setTop(150); obj.comboBox12:setHeight(20); obj.comboBox12:setWidth(45); obj.comboBox12:setField("Velocidade_edc"); obj.comboBox12:setHorzTextAlign("center"); obj.comboBox12:setItems({'-6', '-5', '-4', '-3', '-2', '-1', '0', '1', '2', '3', '4', '5', '6'}); obj.comboBox12:setValues({'1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13'}); obj.comboBox12:setName("comboBox12"); obj.dataLink36 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink36:setParent(obj.layout24); obj.dataLink36:setField("Velocidade_edc"); obj.dataLink36:setDefaultValue("7"); obj.dataLink36:setName("dataLink36"); obj.layout25 = GUI.fromHandle(_obj_newObject("layout")); obj.layout25:setParent(obj.rectangle41); obj.layout25:setLeft(800); obj.layout25:setTop(190); obj.layout25:setHeight(320); obj.layout25:setWidth(420); obj.layout25:setName("layout25"); obj.imageCheckBox3 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox3:setParent(obj.layout25); obj.imageCheckBox3:setLeft(00); obj.imageCheckBox3:setTop(0); obj.imageCheckBox3:setHeight(30); obj.imageCheckBox3:setWidth(30); obj.imageCheckBox3:setField("SlotActive1"); obj.imageCheckBox3:setHint("Aba 1, Slot 1"); obj.imageCheckBox3:setImageChecked("/img/Poke1T.png"); obj.imageCheckBox3:setImageUnchecked("/img/Poke1F.png"); obj.imageCheckBox3:setName("imageCheckBox3"); obj.dataLink37 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink37:setParent(obj.layout25); obj.dataLink37:setField("SlotActive1"); obj.dataLink37:setDefaultValue("false"); obj.dataLink37:setName("dataLink37"); obj.dataLink38 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink38:setParent(obj.layout25); obj.dataLink38:setField("SlotActive2"); obj.dataLink38:setDefaultValue("false"); obj.dataLink38:setName("dataLink38"); obj.dataLink39 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink39:setParent(obj.layout25); obj.dataLink39:setField("SlotActive3"); obj.dataLink39:setDefaultValue("false"); obj.dataLink39:setName("dataLink39"); obj.dataLink40 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink40:setParent(obj.layout25); obj.dataLink40:setField("SlotActive4"); obj.dataLink40:setDefaultValue("false"); obj.dataLink40:setName("dataLink40"); obj.dataLink41 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink41:setParent(obj.layout25); obj.dataLink41:setField("SlotActive5"); obj.dataLink41:setDefaultValue("false"); obj.dataLink41:setName("dataLink41"); obj.dataLink42 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink42:setParent(obj.layout25); obj.dataLink42:setField("SlotActive6"); obj.dataLink42:setDefaultValue("false"); obj.dataLink42:setName("dataLink42"); obj.dataLink43 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink43:setParent(obj.layout25); obj.dataLink43:setField("SlotActive7"); obj.dataLink43:setDefaultValue("true"); obj.dataLink43:setName("dataLink43"); obj.imageCheckBox4 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox4:setParent(obj.layout25); obj.imageCheckBox4:setLeft(00); obj.imageCheckBox4:setTop(35); obj.imageCheckBox4:setHeight(30); obj.imageCheckBox4:setWidth(30); obj.imageCheckBox4:setField("SlotActive2"); obj.imageCheckBox4:setHint("Aba 1, Slot 2"); obj.imageCheckBox4:setImageChecked("/img/Poke2T.png"); obj.imageCheckBox4:setImageUnchecked("/img/Poke2F.png"); obj.imageCheckBox4:setName("imageCheckBox4"); obj.dataLink44 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink44:setParent(obj.layout25); obj.dataLink44:setField("SlotActive1"); obj.dataLink44:setDefaultValue("false"); obj.dataLink44:setName("dataLink44"); obj.dataLink45 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink45:setParent(obj.layout25); obj.dataLink45:setField("SlotActive2"); obj.dataLink45:setDefaultValue("false"); obj.dataLink45:setName("dataLink45"); obj.dataLink46 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink46:setParent(obj.layout25); obj.dataLink46:setField("SlotActive3"); obj.dataLink46:setDefaultValue("false"); obj.dataLink46:setName("dataLink46"); obj.dataLink47 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink47:setParent(obj.layout25); obj.dataLink47:setField("SlotActive4"); obj.dataLink47:setDefaultValue("false"); obj.dataLink47:setName("dataLink47"); obj.dataLink48 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink48:setParent(obj.layout25); obj.dataLink48:setField("SlotActive5"); obj.dataLink48:setDefaultValue("false"); obj.dataLink48:setName("dataLink48"); obj.dataLink49 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink49:setParent(obj.layout25); obj.dataLink49:setField("SlotActive6"); obj.dataLink49:setDefaultValue("false"); obj.dataLink49:setName("dataLink49"); obj.dataLink50 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink50:setParent(obj.layout25); obj.dataLink50:setField("SlotActive7"); obj.dataLink50:setDefaultValue("true"); obj.dataLink50:setName("dataLink50"); obj.imageCheckBox5 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox5:setParent(obj.layout25); obj.imageCheckBox5:setLeft(00); obj.imageCheckBox5:setTop(70); obj.imageCheckBox5:setHeight(30); obj.imageCheckBox5:setWidth(30); obj.imageCheckBox5:setField("SlotActive3"); obj.imageCheckBox5:setHint("Aba 1, Slot 3"); obj.imageCheckBox5:setImageChecked("/img/Poke3T.png"); obj.imageCheckBox5:setImageUnchecked("/img/Poke3F.png"); obj.imageCheckBox5:setName("imageCheckBox5"); obj.dataLink51 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink51:setParent(obj.layout25); obj.dataLink51:setField("SlotActive1"); obj.dataLink51:setDefaultValue("false"); obj.dataLink51:setName("dataLink51"); obj.dataLink52 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink52:setParent(obj.layout25); obj.dataLink52:setField("SlotActive2"); obj.dataLink52:setDefaultValue("false"); obj.dataLink52:setName("dataLink52"); obj.dataLink53 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink53:setParent(obj.layout25); obj.dataLink53:setField("SlotActive3"); obj.dataLink53:setDefaultValue("false"); obj.dataLink53:setName("dataLink53"); obj.dataLink54 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink54:setParent(obj.layout25); obj.dataLink54:setField("SlotActive4"); obj.dataLink54:setDefaultValue("false"); obj.dataLink54:setName("dataLink54"); obj.dataLink55 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink55:setParent(obj.layout25); obj.dataLink55:setField("SlotActive5"); obj.dataLink55:setDefaultValue("false"); obj.dataLink55:setName("dataLink55"); obj.dataLink56 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink56:setParent(obj.layout25); obj.dataLink56:setField("SlotActive6"); obj.dataLink56:setDefaultValue("false"); obj.dataLink56:setName("dataLink56"); obj.dataLink57 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink57:setParent(obj.layout25); obj.dataLink57:setField("SlotActive7"); obj.dataLink57:setDefaultValue("true"); obj.dataLink57:setName("dataLink57"); obj.imageCheckBox6 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox6:setParent(obj.layout25); obj.imageCheckBox6:setLeft(40); obj.imageCheckBox6:setTop(0); obj.imageCheckBox6:setHeight(30); obj.imageCheckBox6:setWidth(30); obj.imageCheckBox6:setField("SlotActive4"); obj.imageCheckBox6:setHint("Aba 1, Slot 4"); obj.imageCheckBox6:setImageChecked("/img/Poke4T.png"); obj.imageCheckBox6:setImageUnchecked("/img/Poke4F.png"); obj.imageCheckBox6:setName("imageCheckBox6"); obj.dataLink58 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink58:setParent(obj.layout25); obj.dataLink58:setField("SlotActive1"); obj.dataLink58:setDefaultValue("false"); obj.dataLink58:setName("dataLink58"); obj.dataLink59 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink59:setParent(obj.layout25); obj.dataLink59:setField("SlotActive2"); obj.dataLink59:setDefaultValue("false"); obj.dataLink59:setName("dataLink59"); obj.dataLink60 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink60:setParent(obj.layout25); obj.dataLink60:setField("SlotActive3"); obj.dataLink60:setDefaultValue("false"); obj.dataLink60:setName("dataLink60"); obj.dataLink61 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink61:setParent(obj.layout25); obj.dataLink61:setField("SlotActive4"); obj.dataLink61:setDefaultValue("false"); obj.dataLink61:setName("dataLink61"); obj.dataLink62 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink62:setParent(obj.layout25); obj.dataLink62:setField("SlotActive5"); obj.dataLink62:setDefaultValue("false"); obj.dataLink62:setName("dataLink62"); obj.dataLink63 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink63:setParent(obj.layout25); obj.dataLink63:setField("SlotActive6"); obj.dataLink63:setDefaultValue("false"); obj.dataLink63:setName("dataLink63"); obj.dataLink64 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink64:setParent(obj.layout25); obj.dataLink64:setField("SlotActive7"); obj.dataLink64:setDefaultValue("true"); obj.dataLink64:setName("dataLink64"); obj.imageCheckBox7 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox7:setParent(obj.layout25); obj.imageCheckBox7:setLeft(40); obj.imageCheckBox7:setTop(35); obj.imageCheckBox7:setHeight(30); obj.imageCheckBox7:setWidth(30); obj.imageCheckBox7:setField("SlotActive5"); obj.imageCheckBox7:setHint("Aba 1, Slot 5"); obj.imageCheckBox7:setImageChecked("/img/Poke5T.png"); obj.imageCheckBox7:setImageUnchecked("/img/Poke5F.png"); obj.imageCheckBox7:setName("imageCheckBox7"); obj.dataLink65 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink65:setParent(obj.layout25); obj.dataLink65:setField("SlotActive1"); obj.dataLink65:setDefaultValue("false"); obj.dataLink65:setName("dataLink65"); obj.dataLink66 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink66:setParent(obj.layout25); obj.dataLink66:setField("SlotActive2"); obj.dataLink66:setDefaultValue("false"); obj.dataLink66:setName("dataLink66"); obj.dataLink67 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink67:setParent(obj.layout25); obj.dataLink67:setField("SlotActive3"); obj.dataLink67:setDefaultValue("false"); obj.dataLink67:setName("dataLink67"); obj.dataLink68 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink68:setParent(obj.layout25); obj.dataLink68:setField("SlotActive4"); obj.dataLink68:setDefaultValue("false"); obj.dataLink68:setName("dataLink68"); obj.dataLink69 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink69:setParent(obj.layout25); obj.dataLink69:setField("SlotActive5"); obj.dataLink69:setDefaultValue("false"); obj.dataLink69:setName("dataLink69"); obj.dataLink70 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink70:setParent(obj.layout25); obj.dataLink70:setField("SlotActive6"); obj.dataLink70:setDefaultValue("false"); obj.dataLink70:setName("dataLink70"); obj.dataLink71 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink71:setParent(obj.layout25); obj.dataLink71:setField("SlotActive7"); obj.dataLink71:setDefaultValue("true"); obj.dataLink71:setName("dataLink71"); obj.imageCheckBox8 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox8:setParent(obj.layout25); obj.imageCheckBox8:setLeft(40); obj.imageCheckBox8:setTop(70); obj.imageCheckBox8:setHeight(30); obj.imageCheckBox8:setWidth(30); obj.imageCheckBox8:setField("SlotActive6"); obj.imageCheckBox8:setHint("Aba 1, Slot 6"); obj.imageCheckBox8:setImageChecked("/img/Poke6T.png"); obj.imageCheckBox8:setImageUnchecked("/img/Poke6F.png"); obj.imageCheckBox8:setName("imageCheckBox8"); obj.dataLink72 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink72:setParent(obj.layout25); obj.dataLink72:setField("SlotActive1"); obj.dataLink72:setDefaultValue("false"); obj.dataLink72:setName("dataLink72"); obj.dataLink73 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink73:setParent(obj.layout25); obj.dataLink73:setField("SlotActive2"); obj.dataLink73:setDefaultValue("false"); obj.dataLink73:setName("dataLink73"); obj.dataLink74 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink74:setParent(obj.layout25); obj.dataLink74:setField("SlotActive3"); obj.dataLink74:setDefaultValue("false"); obj.dataLink74:setName("dataLink74"); obj.dataLink75 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink75:setParent(obj.layout25); obj.dataLink75:setField("SlotActive4"); obj.dataLink75:setDefaultValue("false"); obj.dataLink75:setName("dataLink75"); obj.dataLink76 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink76:setParent(obj.layout25); obj.dataLink76:setField("SlotActive5"); obj.dataLink76:setDefaultValue("false"); obj.dataLink76:setName("dataLink76"); obj.dataLink77 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink77:setParent(obj.layout25); obj.dataLink77:setField("SlotActive6"); obj.dataLink77:setDefaultValue("false"); obj.dataLink77:setName("dataLink77"); obj.dataLink78 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink78:setParent(obj.layout25); obj.dataLink78:setField("SlotActive7"); obj.dataLink78:setDefaultValue("true"); obj.dataLink78:setName("dataLink78"); obj.imageCheckBox9 = GUI.fromHandle(_obj_newObject("imageCheckBox")); obj.imageCheckBox9:setParent(obj.layout25); obj.imageCheckBox9:setLeft(20); obj.imageCheckBox9:setTop(105); obj.imageCheckBox9:setHeight(30); obj.imageCheckBox9:setWidth(30); obj.imageCheckBox9:setField("SlotActive7"); obj.imageCheckBox9:setHint("Na Reserva"); obj.imageCheckBox9:setImageChecked("/img/Computer_ON.png"); obj.imageCheckBox9:setImageUnchecked("/img/Computer_OFF.png"); obj.imageCheckBox9:setName("imageCheckBox9"); obj.dataLink79 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink79:setParent(obj.layout25); obj.dataLink79:setField("SlotActive1"); obj.dataLink79:setDefaultValue("false"); obj.dataLink79:setName("dataLink79"); obj.dataLink80 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink80:setParent(obj.layout25); obj.dataLink80:setField("SlotActive2"); obj.dataLink80:setDefaultValue("false"); obj.dataLink80:setName("dataLink80"); obj.dataLink81 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink81:setParent(obj.layout25); obj.dataLink81:setField("SlotActive3"); obj.dataLink81:setDefaultValue("false"); obj.dataLink81:setName("dataLink81"); obj.dataLink82 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink82:setParent(obj.layout25); obj.dataLink82:setField("SlotActive4"); obj.dataLink82:setDefaultValue("false"); obj.dataLink82:setName("dataLink82"); obj.dataLink83 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink83:setParent(obj.layout25); obj.dataLink83:setField("SlotActive5"); obj.dataLink83:setDefaultValue("false"); obj.dataLink83:setName("dataLink83"); obj.dataLink84 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink84:setParent(obj.layout25); obj.dataLink84:setField("SlotActive6"); obj.dataLink84:setDefaultValue("false"); obj.dataLink84:setName("dataLink84"); obj.dataLink85 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink85:setParent(obj.layout25); obj.dataLink85:setField("SlotActive7"); obj.dataLink85:setDefaultValue("true"); obj.dataLink85:setName("dataLink85"); obj.layout26 = GUI.fromHandle(_obj_newObject("layout")); obj.layout26:setParent(obj.rectangle41); obj.layout26:setLeft(470); obj.layout26:setTop(340); obj.layout26:setHeight(600); obj.layout26:setWidth(1000); obj.layout26:setName("layout26"); obj.image35 = GUI.fromHandle(_obj_newObject("image")); obj.image35:setParent(obj.layout26); obj.image35:setLeft(000); obj.image35:setTop(000); obj.image35:setWidth(40); obj.image35:setHeight(40); obj.image35:setSRC("/img/normal2.gif"); obj.image35:setName("image35"); obj.image36 = GUI.fromHandle(_obj_newObject("image")); obj.image36:setParent(obj.layout26); obj.image36:setLeft(045); obj.image36:setTop(000); obj.image36:setWidth(40); obj.image36:setHeight(40); obj.image36:setSRC("/img/fire2.gif"); obj.image36:setName("image36"); obj.image37 = GUI.fromHandle(_obj_newObject("image")); obj.image37:setParent(obj.layout26); obj.image37:setLeft(090); obj.image37:setTop(000); obj.image37:setWidth(40); obj.image37:setHeight(40); obj.image37:setSRC("/img/water2.gif"); obj.image37:setName("image37"); obj.image38 = GUI.fromHandle(_obj_newObject("image")); obj.image38:setParent(obj.layout26); obj.image38:setLeft(135); obj.image38:setTop(000); obj.image38:setWidth(40); obj.image38:setHeight(40); obj.image38:setSRC("/img/electric2.gif"); obj.image38:setName("image38"); obj.image39 = GUI.fromHandle(_obj_newObject("image")); obj.image39:setParent(obj.layout26); obj.image39:setLeft(180); obj.image39:setTop(000); obj.image39:setWidth(40); obj.image39:setHeight(40); obj.image39:setSRC("/img/grass2.gif"); obj.image39:setName("image39"); obj.image40 = GUI.fromHandle(_obj_newObject("image")); obj.image40:setParent(obj.layout26); obj.image40:setLeft(225); obj.image40:setTop(000); obj.image40:setWidth(40); obj.image40:setHeight(40); obj.image40:setSRC("/img/ice2.gif"); obj.image40:setName("image40"); obj.image41 = GUI.fromHandle(_obj_newObject("image")); obj.image41:setParent(obj.layout26); obj.image41:setLeft(270); obj.image41:setTop(000); obj.image41:setWidth(40); obj.image41:setHeight(40); obj.image41:setSRC("/img/fighting2.gif"); obj.image41:setName("image41"); obj.image42 = GUI.fromHandle(_obj_newObject("image")); obj.image42:setParent(obj.layout26); obj.image42:setLeft(315); obj.image42:setTop(000); obj.image42:setWidth(40); obj.image42:setHeight(40); obj.image42:setSRC("/img/poison2.gif"); obj.image42:setName("image42"); obj.image43 = GUI.fromHandle(_obj_newObject("image")); obj.image43:setParent(obj.layout26); obj.image43:setLeft(360); obj.image43:setTop(000); obj.image43:setWidth(40); obj.image43:setHeight(40); obj.image43:setSRC("/img/ground2.gif"); obj.image43:setName("image43"); obj.edit145 = GUI.fromHandle(_obj_newObject("edit")); obj.edit145:setParent(obj.layout26); obj.edit145:setLeft(000); obj.edit145:setTop(045); obj.edit145:setHeight(20); obj.edit145:setWidth(40); obj.edit145:setField("weakTot1"); obj.edit145:setHorzTextAlign("center"); obj.edit145:setEnabled(true); obj.edit145:setName("edit145"); obj.edit146 = GUI.fromHandle(_obj_newObject("edit")); obj.edit146:setParent(obj.layout26); obj.edit146:setLeft(045); obj.edit146:setTop(045); obj.edit146:setHeight(20); obj.edit146:setWidth(40); obj.edit146:setField("weakTot2"); obj.edit146:setHorzTextAlign("center"); obj.edit146:setEnabled(true); obj.edit146:setName("edit146"); obj.edit147 = GUI.fromHandle(_obj_newObject("edit")); obj.edit147:setParent(obj.layout26); obj.edit147:setLeft(090); obj.edit147:setTop(045); obj.edit147:setHeight(20); obj.edit147:setWidth(40); obj.edit147:setField("weakTot3"); obj.edit147:setHorzTextAlign("center"); obj.edit147:setEnabled(true); obj.edit147:setName("edit147"); obj.edit148 = GUI.fromHandle(_obj_newObject("edit")); obj.edit148:setParent(obj.layout26); obj.edit148:setLeft(135); obj.edit148:setTop(045); obj.edit148:setHeight(20); obj.edit148:setWidth(40); obj.edit148:setField("weakTot4"); obj.edit148:setHorzTextAlign("center"); obj.edit148:setEnabled(true); obj.edit148:setName("edit148"); obj.edit149 = GUI.fromHandle(_obj_newObject("edit")); obj.edit149:setParent(obj.layout26); obj.edit149:setLeft(180); obj.edit149:setTop(045); obj.edit149:setHeight(20); obj.edit149:setWidth(40); obj.edit149:setField("weakTot5"); obj.edit149:setHorzTextAlign("center"); obj.edit149:setEnabled(true); obj.edit149:setName("edit149"); obj.edit150 = GUI.fromHandle(_obj_newObject("edit")); obj.edit150:setParent(obj.layout26); obj.edit150:setLeft(225); obj.edit150:setTop(045); obj.edit150:setHeight(20); obj.edit150:setWidth(40); obj.edit150:setField("weakTot6"); obj.edit150:setHorzTextAlign("center"); obj.edit150:setEnabled(true); obj.edit150:setName("edit150"); obj.edit151 = GUI.fromHandle(_obj_newObject("edit")); obj.edit151:setParent(obj.layout26); obj.edit151:setLeft(270); obj.edit151:setTop(045); obj.edit151:setHeight(20); obj.edit151:setWidth(40); obj.edit151:setField("weakTot7"); obj.edit151:setHorzTextAlign("center"); obj.edit151:setEnabled(true); obj.edit151:setName("edit151"); obj.edit152 = GUI.fromHandle(_obj_newObject("edit")); obj.edit152:setParent(obj.layout26); obj.edit152:setLeft(315); obj.edit152:setTop(045); obj.edit152:setHeight(20); obj.edit152:setWidth(40); obj.edit152:setField("weakTot8"); obj.edit152:setHorzTextAlign("center"); obj.edit152:setEnabled(true); obj.edit152:setName("edit152"); obj.edit153 = GUI.fromHandle(_obj_newObject("edit")); obj.edit153:setParent(obj.layout26); obj.edit153:setLeft(360); obj.edit153:setTop(045); obj.edit153:setHeight(20); obj.edit153:setWidth(40); obj.edit153:setField("weakTot9"); obj.edit153:setHorzTextAlign("center"); obj.edit153:setEnabled(true); obj.edit153:setName("edit153"); obj.layout27 = GUI.fromHandle(_obj_newObject("layout")); obj.layout27:setParent(obj.rectangle41); obj.layout27:setLeft(065); obj.layout27:setTop(430); obj.layout27:setHeight(600); obj.layout27:setWidth(1000); obj.layout27:setName("layout27"); obj.image44 = GUI.fromHandle(_obj_newObject("image")); obj.image44:setParent(obj.layout27); obj.image44:setLeft(405); obj.image44:setTop(000); obj.image44:setWidth(40); obj.image44:setHeight(40); obj.image44:setSRC("/img/flying2.gif"); obj.image44:setName("image44"); obj.image45 = GUI.fromHandle(_obj_newObject("image")); obj.image45:setParent(obj.layout27); obj.image45:setLeft(450); obj.image45:setTop(000); obj.image45:setWidth(40); obj.image45:setHeight(40); obj.image45:setSRC("/img/psychic2.gif"); obj.image45:setName("image45"); obj.image46 = GUI.fromHandle(_obj_newObject("image")); obj.image46:setParent(obj.layout27); obj.image46:setLeft(495); obj.image46:setTop(000); obj.image46:setWidth(40); obj.image46:setHeight(40); obj.image46:setSRC("/img/bug2.gif"); obj.image46:setName("image46"); obj.image47 = GUI.fromHandle(_obj_newObject("image")); obj.image47:setParent(obj.layout27); obj.image47:setLeft(540); obj.image47:setTop(000); obj.image47:setWidth(40); obj.image47:setHeight(40); obj.image47:setSRC("/img/rock2.gif"); obj.image47:setName("image47"); obj.image48 = GUI.fromHandle(_obj_newObject("image")); obj.image48:setParent(obj.layout27); obj.image48:setLeft(585); obj.image48:setTop(000); obj.image48:setWidth(40); obj.image48:setHeight(40); obj.image48:setSRC("/img/ghost2.gif"); obj.image48:setName("image48"); obj.image49 = GUI.fromHandle(_obj_newObject("image")); obj.image49:setParent(obj.layout27); obj.image49:setLeft(630); obj.image49:setTop(000); obj.image49:setWidth(40); obj.image49:setHeight(40); obj.image49:setSRC("/img/dragon2.gif"); obj.image49:setName("image49"); obj.image50 = GUI.fromHandle(_obj_newObject("image")); obj.image50:setParent(obj.layout27); obj.image50:setLeft(675); obj.image50:setTop(000); obj.image50:setWidth(40); obj.image50:setHeight(40); obj.image50:setSRC("/img/dark2.gif"); obj.image50:setName("image50"); obj.image51 = GUI.fromHandle(_obj_newObject("image")); obj.image51:setParent(obj.layout27); obj.image51:setLeft(720); obj.image51:setTop(000); obj.image51:setWidth(40); obj.image51:setHeight(40); obj.image51:setSRC("/img/steel2.gif"); obj.image51:setName("image51"); obj.image52 = GUI.fromHandle(_obj_newObject("image")); obj.image52:setParent(obj.layout27); obj.image52:setLeft(765); obj.image52:setTop(000); obj.image52:setWidth(40); obj.image52:setHeight(40); obj.image52:setSRC("/img/fairy2.gif"); obj.image52:setName("image52"); obj.edit154 = GUI.fromHandle(_obj_newObject("edit")); obj.edit154:setParent(obj.layout27); obj.edit154:setLeft(405); obj.edit154:setTop(045); obj.edit154:setHeight(20); obj.edit154:setWidth(40); obj.edit154:setField("weakTot10"); obj.edit154:setHorzTextAlign("center"); obj.edit154:setEnabled(true); obj.edit154:setName("edit154"); obj.edit155 = GUI.fromHandle(_obj_newObject("edit")); obj.edit155:setParent(obj.layout27); obj.edit155:setLeft(450); obj.edit155:setTop(045); obj.edit155:setHeight(20); obj.edit155:setWidth(40); obj.edit155:setField("weakTot11"); obj.edit155:setHorzTextAlign("center"); obj.edit155:setEnabled(true); obj.edit155:setName("edit155"); obj.edit156 = GUI.fromHandle(_obj_newObject("edit")); obj.edit156:setParent(obj.layout27); obj.edit156:setLeft(495); obj.edit156:setTop(045); obj.edit156:setHeight(20); obj.edit156:setWidth(40); obj.edit156:setField("weakTot12"); obj.edit156:setHorzTextAlign("center"); obj.edit156:setEnabled(true); obj.edit156:setName("edit156"); obj.edit157 = GUI.fromHandle(_obj_newObject("edit")); obj.edit157:setParent(obj.layout27); obj.edit157:setLeft(540); obj.edit157:setTop(045); obj.edit157:setHeight(20); obj.edit157:setWidth(40); obj.edit157:setField("weakTot13"); obj.edit157:setHorzTextAlign("center"); obj.edit157:setEnabled(true); obj.edit157:setName("edit157"); obj.edit158 = GUI.fromHandle(_obj_newObject("edit")); obj.edit158:setParent(obj.layout27); obj.edit158:setLeft(585); obj.edit158:setTop(045); obj.edit158:setHeight(20); obj.edit158:setWidth(40); obj.edit158:setField("weakTot14"); obj.edit158:setHorzTextAlign("center"); obj.edit158:setEnabled(true); obj.edit158:setName("edit158"); obj.edit159 = GUI.fromHandle(_obj_newObject("edit")); obj.edit159:setParent(obj.layout27); obj.edit159:setLeft(630); obj.edit159:setTop(045); obj.edit159:setHeight(20); obj.edit159:setWidth(40); obj.edit159:setField("weakTot15"); obj.edit159:setHorzTextAlign("center"); obj.edit159:setEnabled(true); obj.edit159:setName("edit159"); obj.edit160 = GUI.fromHandle(_obj_newObject("edit")); obj.edit160:setParent(obj.layout27); obj.edit160:setLeft(675); obj.edit160:setTop(045); obj.edit160:setHeight(20); obj.edit160:setWidth(40); obj.edit160:setField("weakTot16"); obj.edit160:setHorzTextAlign("center"); obj.edit160:setEnabled(true); obj.edit160:setName("edit160"); obj.edit161 = GUI.fromHandle(_obj_newObject("edit")); obj.edit161:setParent(obj.layout27); obj.edit161:setLeft(720); obj.edit161:setTop(045); obj.edit161:setHeight(20); obj.edit161:setWidth(40); obj.edit161:setField("weakTot17"); obj.edit161:setHorzTextAlign("center"); obj.edit161:setEnabled(true); obj.edit161:setName("edit161"); obj.edit162 = GUI.fromHandle(_obj_newObject("edit")); obj.edit162:setParent(obj.layout27); obj.edit162:setLeft(765); obj.edit162:setTop(045); obj.edit162:setHeight(20); obj.edit162:setWidth(40); obj.edit162:setField("weakTot18"); obj.edit162:setHorzTextAlign("center"); obj.edit162:setEnabled(true); obj.edit162:setName("edit162"); obj.layout28 = GUI.fromHandle(_obj_newObject("layout")); obj.layout28:setParent(obj.rectangle41); obj.layout28:setLeft(50); obj.layout28:setTop(180); obj.layout28:setHeight(500); obj.layout28:setWidth(300); obj.layout28:setName("layout28"); obj.label100 = GUI.fromHandle(_obj_newObject("label")); obj.label100:setParent(obj.layout28); obj.label100:setLeft(000); obj.label100:setTop(00); obj.label100:setHeight(20); obj.label100:setWidth(180); obj.label100:setText("Itens"); obj.label100:setAutoSize(true); obj.label100:setFontColor("White"); obj.label100:setFontSize(14); obj.label100:setHorzTextAlign("center"); obj.label100:setName("label100"); obj.edit163 = GUI.fromHandle(_obj_newObject("edit")); obj.edit163:setParent(obj.layout28); obj.edit163:setVertTextAlign("center"); obj.edit163:setLeft(00); obj.edit163:setTop(25); obj.edit163:setWidth(150); obj.edit163:setHeight(25); obj.edit163:setField("nomeItem1"); obj.edit163:setName("edit163"); obj.BotaoItemA = GUI.fromHandle(_obj_newObject("button")); obj.BotaoItemA:setParent(obj.layout28); obj.BotaoItemA:setLeft(155); obj.BotaoItemA:setTop(25); obj.BotaoItemA:setWidth(23); obj.BotaoItemA:setHeight(25); obj.BotaoItemA:setText("i"); obj.BotaoItemA:setName("BotaoItemA"); obj.dataLink86 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink86:setParent(obj.frmPokemon2); obj.dataLink86:setFields({'campoElem1', 'campoElem2'}); obj.dataLink86:setName("dataLink86"); obj.dataLink87 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink87:setParent(obj.frmPokemon2); obj.dataLink87:setFields({ 'pokeLevel', 'Vida_Base1','Vida_Bon1','Vida_Nivel','Vida_Vit','pokHP_Les','basSEX','campoApelido','campoNome', 'Ataque_Base1', 'Ataque_Bon1', 'Ataque_Bon2','Ataque_Nivel','Ataque_Vit','Ataque_edc','campoPokemon', 'Defesa_Base1', 'Defesa_Bon1', 'Defesa_Bon2','Defesa_Nivel','Defesa_Vit','Defesa_edc', 'AtaqueEsp_Base1', 'AtaqueEsp_Bon1', 'AtaqueEsp_Bon2','AtaqueEsp_Nivel','AtaqueEsp_Vit','AtaqueEsp_edc', 'DefesaEsp_Base1', 'DefesaEsp_Bon1', 'DefesaEsp_Bon2','DefesaEsp_Nivel','DefesaEsp_Vit','DefesaEsp_edc', 'Velocidade_Nivel','Velocidade_Base1','Velocidade_Bon1','Velocidade_Bon2','Velocidade_Vit','Velocidade_edc', 'pok_bonEVAF', 'pok_bonEVAE', 'pok_bonEVAV', 'pok_bonINI','Treino_Bonus', 'MegaEvo', 'active','baseHPAtual', 'baseHPMAX', 'SlotActive1', 'SlotActive2', 'SlotActive3', 'SlotActive4', 'SlotActive5', 'SlotActive6', 'SlotActive7'}); obj.dataLink87:setName("dataLink87"); obj.dataLink88 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink88:setParent(obj.frmPokemon2); obj.dataLink88:setFields({'campoNatPlus', 'campoNatMinus'}); obj.dataLink88:setName("dataLink88"); obj.tab4 = GUI.fromHandle(_obj_newObject("tab")); obj.tab4:setParent(obj.tabControl2); obj.tab4:setTitle("Golpes"); obj.tab4:setName("tab4"); obj.frmPokemon3 = GUI.fromHandle(_obj_newObject("form")); obj.frmPokemon3:setParent(obj.tab4); obj.frmPokemon3:setName("frmPokemon3"); obj.frmPokemon3:setAlign("client"); obj.frmPokemon3:setTheme("dark"); obj.frmPokemon3:setMargins({top=1}); obj.scrollBox3 = GUI.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox3:setParent(obj.frmPokemon3); obj.scrollBox3:setAlign("left"); obj.scrollBox3:setWidth(880); obj.scrollBox3:setName("scrollBox3"); obj.layout29 = GUI.fromHandle(_obj_newObject("layout")); obj.layout29:setParent(obj.scrollBox3); obj.layout29:setLeft(0); obj.layout29:setTop(0); obj.layout29:setWidth(865); obj.layout29:setHeight(760); obj.layout29:setName("layout29"); obj.rectangle44 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle44:setParent(obj.layout29); obj.rectangle44:setAlign("client"); obj.rectangle44:setColor("#0000007F"); obj.rectangle44:setName("rectangle44"); obj.layout30 = GUI.fromHandle(_obj_newObject("layout")); obj.layout30:setParent(obj.layout29); obj.layout30:setLeft(2); obj.layout30:setTop(2); obj.layout30:setWidth(880); obj.layout30:setHeight(92); obj.layout30:setName("layout30"); obj.rectangle45 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle45:setParent(obj.layout30); obj.rectangle45:setAlign("client"); obj.rectangle45:setColor("black"); obj.rectangle45:setName("rectangle45"); obj.label101 = GUI.fromHandle(_obj_newObject("label")); obj.label101:setParent(obj.layout30); obj.label101:setLeft(5); obj.label101:setTop(5); obj.label101:setWidth(70); obj.label101:setHeight(25); obj.label101:setText("Golpe"); lfm_setPropAsString(obj.label101, "fontStyle", "bold"); obj.label101:setName("label101"); obj.edit164 = GUI.fromHandle(_obj_newObject("edit")); obj.edit164:setParent(obj.layout30); obj.edit164:setVertTextAlign("center"); obj.edit164:setLeft(75); obj.edit164:setTop(5); obj.edit164:setWidth(160); obj.edit164:setHeight(25); obj.edit164:setField("golpeP1"); obj.edit164:setName("edit164"); obj.label102 = GUI.fromHandle(_obj_newObject("label")); obj.label102:setParent(obj.layout30); obj.label102:setLeft(5); obj.label102:setTop(30); obj.label102:setWidth(80); obj.label102:setHeight(25); obj.label102:setText("Descritores"); lfm_setPropAsString(obj.label102, "fontStyle", "bold"); obj.label102:setName("label102"); obj.edit165 = GUI.fromHandle(_obj_newObject("edit")); obj.edit165:setParent(obj.layout30); obj.edit165:setVertTextAlign("center"); obj.edit165:setLeft(75); obj.edit165:setTop(30); obj.edit165:setWidth(160); obj.edit165:setHeight(25); obj.edit165:setField("DescritoresP1"); obj.edit165:setName("edit165"); obj.label103 = GUI.fromHandle(_obj_newObject("label")); obj.label103:setParent(obj.layout30); obj.label103:setLeft(5); obj.label103:setTop(55); obj.label103:setWidth(70); obj.label103:setHeight(25); obj.label103:setText("Alcance"); lfm_setPropAsString(obj.label103, "fontStyle", "bold"); obj.label103:setName("label103"); obj.edit166 = GUI.fromHandle(_obj_newObject("edit")); obj.edit166:setParent(obj.layout30); obj.edit166:setVertTextAlign("center"); obj.edit166:setLeft(75); obj.edit166:setTop(55); obj.edit166:setWidth(160); obj.edit166:setHeight(25); obj.edit166:setField("alcanceP1"); obj.edit166:setName("edit166"); obj.label104 = GUI.fromHandle(_obj_newObject("label")); obj.label104:setParent(obj.layout30); obj.label104:setLeft(240); obj.label104:setTop(6); obj.label104:setWidth(50); obj.label104:setHeight(25); obj.label104:setText("Tipo"); lfm_setPropAsString(obj.label104, "fontStyle", "bold"); obj.label104:setName("label104"); obj.edit167 = GUI.fromHandle(_obj_newObject("edit")); obj.edit167:setParent(obj.layout30); obj.edit167:setVertTextAlign("center"); obj.edit167:setLeft(282); obj.edit167:setTop(6); obj.edit167:setWidth(82); obj.edit167:setHeight(25); obj.edit167:setField("tipoP1"); obj.edit167:setName("edit167"); obj.label105 = GUI.fromHandle(_obj_newObject("label")); obj.label105:setParent(obj.layout30); obj.label105:setLeft(240); obj.label105:setTop(31); obj.label105:setWidth(50); obj.label105:setHeight(25); obj.label105:setText("Classe"); lfm_setPropAsString(obj.label105, "fontStyle", "bold"); obj.label105:setName("label105"); obj.comboBox13 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox13:setParent(obj.layout30); obj.comboBox13:setLeft(282); obj.comboBox13:setTop(31); obj.comboBox13:setWidth(82); obj.comboBox13:setHeight(25); obj.comboBox13:setField("classeP1"); obj.comboBox13:setHorzTextAlign("center"); obj.comboBox13:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox13:setValues({'1', '2', '3'}); obj.comboBox13:setName("comboBox13"); obj.label106 = GUI.fromHandle(_obj_newObject("label")); obj.label106:setParent(obj.layout30); obj.label106:setLeft(240); obj.label106:setTop(55); obj.label106:setWidth(50); obj.label106:setHeight(25); obj.label106:setText("Freq."); lfm_setPropAsString(obj.label106, "fontStyle", "bold"); obj.label106:setName("label106"); obj.edit168 = GUI.fromHandle(_obj_newObject("edit")); obj.edit168:setParent(obj.layout30); obj.edit168:setVertTextAlign("center"); obj.edit168:setLeft(282); obj.edit168:setTop(55); obj.edit168:setWidth(82); obj.edit168:setHeight(25); obj.edit168:setField("frequenciaP1"); obj.edit168:setName("edit168"); obj.label107 = GUI.fromHandle(_obj_newObject("label")); obj.label107:setParent(obj.layout30); obj.label107:setLeft(370); obj.label107:setTop(6); obj.label107:setWidth(70); obj.label107:setHeight(25); obj.label107:setText("Acurácia"); lfm_setPropAsString(obj.label107, "fontStyle", "bold"); obj.label107:setName("label107"); obj.edit169 = GUI.fromHandle(_obj_newObject("edit")); obj.edit169:setParent(obj.layout30); obj.edit169:setVertTextAlign("center"); obj.edit169:setLeft(425); obj.edit169:setTop(6); obj.edit169:setWidth(53); obj.edit169:setHeight(25); obj.edit169:setField("AccP1"); obj.edit169:setType("number"); obj.edit169:setName("edit169"); obj.label108 = GUI.fromHandle(_obj_newObject("label")); obj.label108:setParent(obj.layout30); obj.label108:setLeft(370); obj.label108:setTop(31); obj.label108:setWidth(70); obj.label108:setHeight(25); obj.label108:setText("Prec.Bôn."); lfm_setPropAsString(obj.label108, "fontStyle", "bold"); obj.label108:setName("label108"); obj.edit170 = GUI.fromHandle(_obj_newObject("edit")); obj.edit170:setParent(obj.layout30); obj.edit170:setVertTextAlign("center"); obj.edit170:setLeft(425); obj.edit170:setTop(31); obj.edit170:setWidth(53); obj.edit170:setHeight(25); obj.edit170:setField("ataqueP1"); obj.edit170:setType("number"); obj.edit170:setName("edit170"); obj.label109 = GUI.fromHandle(_obj_newObject("label")); obj.label109:setParent(obj.layout30); obj.label109:setLeft(370); obj.label109:setTop(55); obj.label109:setWidth(70); obj.label109:setHeight(25); obj.label109:setText("D. Base"); lfm_setPropAsString(obj.label109, "fontStyle", "bold"); obj.label109:setName("label109"); obj.edit171 = GUI.fromHandle(_obj_newObject("edit")); obj.edit171:setParent(obj.layout30); obj.edit171:setVertTextAlign("center"); obj.edit171:setLeft(425); obj.edit171:setTop(55); obj.edit171:setWidth(53); obj.edit171:setHeight(25); obj.edit171:setField("danoP1"); obj.edit171:setName("edit171"); obj.button11 = GUI.fromHandle(_obj_newObject("button")); obj.button11:setParent(obj.layout30); obj.button11:setLeft(488); obj.button11:setTop(6); obj.button11:setWidth(82); obj.button11:setText("Acerto"); obj.button11:setFontSize(11); lfm_setPropAsString(obj.button11, "fontStyle", "bold"); obj.button11:setName("button11"); obj.button12 = GUI.fromHandle(_obj_newObject("button")); obj.button12:setParent(obj.layout30); obj.button12:setLeft(488); obj.button12:setTop(31); obj.button12:setWidth(82); obj.button12:setText("Dano"); obj.button12:setFontSize(11); lfm_setPropAsString(obj.button12, "fontStyle", "bold"); obj.button12:setName("button12"); obj.button13 = GUI.fromHandle(_obj_newObject("button")); obj.button13:setParent(obj.layout30); obj.button13:setLeft(488); obj.button13:setTop(55); obj.button13:setWidth(82); obj.button13:setText("Crítico"); obj.button13:setFontSize(11); lfm_setPropAsString(obj.button13, "fontStyle", "bold"); obj.button13:setName("button13"); obj.textEditor2 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor2:setParent(obj.layout30); obj.textEditor2:setLeft(575); obj.textEditor2:setTop(5); obj.textEditor2:setWidth(280); obj.textEditor2:setHeight(50); obj.textEditor2:setField("campoEfeitoGolpesP1"); obj.textEditor2:setName("textEditor2"); obj.label110 = GUI.fromHandle(_obj_newObject("label")); obj.label110:setParent(obj.layout30); obj.label110:setLeft(575); obj.label110:setTop(55); obj.label110:setWidth(60); obj.label110:setHeight(25); obj.label110:setText("Aptidão"); lfm_setPropAsString(obj.label110, "fontStyle", "bold"); obj.label110:setName("label110"); obj.edit172 = GUI.fromHandle(_obj_newObject("edit")); obj.edit172:setParent(obj.layout30); obj.edit172:setVertTextAlign("center"); obj.edit172:setLeft(625); obj.edit172:setTop(60); obj.edit172:setWidth(55); obj.edit172:setHeight(25); obj.edit172:setField("tipoContestP1"); obj.edit172:setName("edit172"); obj.label111 = GUI.fromHandle(_obj_newObject("label")); obj.label111:setParent(obj.layout30); obj.label111:setLeft(685); obj.label111:setTop(55); obj.label111:setWidth(40); obj.label111:setHeight(25); obj.label111:setText("Conc."); lfm_setPropAsString(obj.label111, "fontStyle", "bold"); obj.label111:setName("label111"); obj.edit173 = GUI.fromHandle(_obj_newObject("edit")); obj.edit173:setParent(obj.layout30); obj.edit173:setVertTextAlign("center"); obj.edit173:setLeft(730); obj.edit173:setTop(60); obj.edit173:setWidth(125); obj.edit173:setHeight(25); obj.edit173:setField("efeitoContestP1"); obj.edit173:setName("edit173"); obj.layout31 = GUI.fromHandle(_obj_newObject("layout")); obj.layout31:setParent(obj.layout29); obj.layout31:setLeft(2); obj.layout31:setTop(97); obj.layout31:setWidth(880); obj.layout31:setHeight(92); obj.layout31:setName("layout31"); obj.rectangle46 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle46:setParent(obj.layout31); obj.rectangle46:setAlign("client"); obj.rectangle46:setColor("black"); obj.rectangle46:setName("rectangle46"); obj.label112 = GUI.fromHandle(_obj_newObject("label")); obj.label112:setParent(obj.layout31); obj.label112:setLeft(5); obj.label112:setTop(5); obj.label112:setWidth(70); obj.label112:setHeight(25); obj.label112:setText("Golpe"); lfm_setPropAsString(obj.label112, "fontStyle", "bold"); obj.label112:setName("label112"); obj.edit174 = GUI.fromHandle(_obj_newObject("edit")); obj.edit174:setParent(obj.layout31); obj.edit174:setVertTextAlign("center"); obj.edit174:setLeft(75); obj.edit174:setTop(5); obj.edit174:setWidth(160); obj.edit174:setHeight(25); obj.edit174:setField("golpeP2"); obj.edit174:setName("edit174"); obj.label113 = GUI.fromHandle(_obj_newObject("label")); obj.label113:setParent(obj.layout31); obj.label113:setLeft(5); obj.label113:setTop(30); obj.label113:setWidth(80); obj.label113:setHeight(25); obj.label113:setText("Descritores"); lfm_setPropAsString(obj.label113, "fontStyle", "bold"); obj.label113:setName("label113"); obj.edit175 = GUI.fromHandle(_obj_newObject("edit")); obj.edit175:setParent(obj.layout31); obj.edit175:setVertTextAlign("center"); obj.edit175:setLeft(75); obj.edit175:setTop(30); obj.edit175:setWidth(160); obj.edit175:setHeight(25); obj.edit175:setField("DescritoresP2"); obj.edit175:setName("edit175"); obj.label114 = GUI.fromHandle(_obj_newObject("label")); obj.label114:setParent(obj.layout31); obj.label114:setLeft(5); obj.label114:setTop(55); obj.label114:setWidth(70); obj.label114:setHeight(25); obj.label114:setText("Alcance"); lfm_setPropAsString(obj.label114, "fontStyle", "bold"); obj.label114:setName("label114"); obj.edit176 = GUI.fromHandle(_obj_newObject("edit")); obj.edit176:setParent(obj.layout31); obj.edit176:setVertTextAlign("center"); obj.edit176:setLeft(75); obj.edit176:setTop(55); obj.edit176:setWidth(160); obj.edit176:setHeight(25); obj.edit176:setField("alcanceP2"); obj.edit176:setName("edit176"); obj.label115 = GUI.fromHandle(_obj_newObject("label")); obj.label115:setParent(obj.layout31); obj.label115:setLeft(240); obj.label115:setTop(6); obj.label115:setWidth(50); obj.label115:setHeight(25); obj.label115:setText("Tipo"); lfm_setPropAsString(obj.label115, "fontStyle", "bold"); obj.label115:setName("label115"); obj.edit177 = GUI.fromHandle(_obj_newObject("edit")); obj.edit177:setParent(obj.layout31); obj.edit177:setVertTextAlign("center"); obj.edit177:setLeft(282); obj.edit177:setTop(6); obj.edit177:setWidth(82); obj.edit177:setHeight(25); obj.edit177:setField("tipoP2"); obj.edit177:setName("edit177"); obj.label116 = GUI.fromHandle(_obj_newObject("label")); obj.label116:setParent(obj.layout31); obj.label116:setLeft(240); obj.label116:setTop(31); obj.label116:setWidth(50); obj.label116:setHeight(25); obj.label116:setText("Classe"); lfm_setPropAsString(obj.label116, "fontStyle", "bold"); obj.label116:setName("label116"); obj.comboBox14 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox14:setParent(obj.layout31); obj.comboBox14:setLeft(282); obj.comboBox14:setTop(31); obj.comboBox14:setWidth(82); obj.comboBox14:setHeight(25); obj.comboBox14:setField("classeP2"); obj.comboBox14:setHorzTextAlign("center"); obj.comboBox14:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox14:setValues({'1', '2', '3'}); obj.comboBox14:setName("comboBox14"); obj.label117 = GUI.fromHandle(_obj_newObject("label")); obj.label117:setParent(obj.layout31); obj.label117:setLeft(240); obj.label117:setTop(55); obj.label117:setWidth(50); obj.label117:setHeight(25); obj.label117:setText("Freq."); lfm_setPropAsString(obj.label117, "fontStyle", "bold"); obj.label117:setName("label117"); obj.edit178 = GUI.fromHandle(_obj_newObject("edit")); obj.edit178:setParent(obj.layout31); obj.edit178:setVertTextAlign("center"); obj.edit178:setLeft(282); obj.edit178:setTop(55); obj.edit178:setWidth(82); obj.edit178:setHeight(25); obj.edit178:setField("frequenciaP2"); obj.edit178:setName("edit178"); obj.label118 = GUI.fromHandle(_obj_newObject("label")); obj.label118:setParent(obj.layout31); obj.label118:setLeft(370); obj.label118:setTop(6); obj.label118:setWidth(70); obj.label118:setHeight(25); obj.label118:setText("Acurácia"); lfm_setPropAsString(obj.label118, "fontStyle", "bold"); obj.label118:setName("label118"); obj.edit179 = GUI.fromHandle(_obj_newObject("edit")); obj.edit179:setParent(obj.layout31); obj.edit179:setVertTextAlign("center"); obj.edit179:setLeft(425); obj.edit179:setTop(6); obj.edit179:setWidth(53); obj.edit179:setHeight(25); obj.edit179:setField("AccP2"); obj.edit179:setType("number"); obj.edit179:setName("edit179"); obj.label119 = GUI.fromHandle(_obj_newObject("label")); obj.label119:setParent(obj.layout31); obj.label119:setLeft(370); obj.label119:setTop(31); obj.label119:setWidth(70); obj.label119:setHeight(25); obj.label119:setText("Prec.Bôn."); lfm_setPropAsString(obj.label119, "fontStyle", "bold"); obj.label119:setName("label119"); obj.edit180 = GUI.fromHandle(_obj_newObject("edit")); obj.edit180:setParent(obj.layout31); obj.edit180:setVertTextAlign("center"); obj.edit180:setLeft(425); obj.edit180:setTop(31); obj.edit180:setWidth(53); obj.edit180:setHeight(25); obj.edit180:setField("ataqueP2"); obj.edit180:setType("number"); obj.edit180:setName("edit180"); obj.label120 = GUI.fromHandle(_obj_newObject("label")); obj.label120:setParent(obj.layout31); obj.label120:setLeft(370); obj.label120:setTop(55); obj.label120:setWidth(70); obj.label120:setHeight(25); obj.label120:setText("D. Base"); lfm_setPropAsString(obj.label120, "fontStyle", "bold"); obj.label120:setName("label120"); obj.edit181 = GUI.fromHandle(_obj_newObject("edit")); obj.edit181:setParent(obj.layout31); obj.edit181:setVertTextAlign("center"); obj.edit181:setLeft(425); obj.edit181:setTop(55); obj.edit181:setWidth(53); obj.edit181:setHeight(25); obj.edit181:setField("danoP2"); obj.edit181:setName("edit181"); obj.button14 = GUI.fromHandle(_obj_newObject("button")); obj.button14:setParent(obj.layout31); obj.button14:setLeft(488); obj.button14:setTop(6); obj.button14:setWidth(82); obj.button14:setText("Acerto"); obj.button14:setFontSize(11); lfm_setPropAsString(obj.button14, "fontStyle", "bold"); obj.button14:setName("button14"); obj.button15 = GUI.fromHandle(_obj_newObject("button")); obj.button15:setParent(obj.layout31); obj.button15:setLeft(488); obj.button15:setTop(31); obj.button15:setWidth(82); obj.button15:setText("Dano"); obj.button15:setFontSize(11); lfm_setPropAsString(obj.button15, "fontStyle", "bold"); obj.button15:setName("button15"); obj.button16 = GUI.fromHandle(_obj_newObject("button")); obj.button16:setParent(obj.layout31); obj.button16:setLeft(488); obj.button16:setTop(55); obj.button16:setWidth(82); obj.button16:setText("Crítico"); obj.button16:setFontSize(11); lfm_setPropAsString(obj.button16, "fontStyle", "bold"); obj.button16:setName("button16"); obj.textEditor3 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor3:setParent(obj.layout31); obj.textEditor3:setLeft(575); obj.textEditor3:setTop(5); obj.textEditor3:setWidth(280); obj.textEditor3:setHeight(50); obj.textEditor3:setField("campoEfeitoGolpesP2"); obj.textEditor3:setName("textEditor3"); obj.label121 = GUI.fromHandle(_obj_newObject("label")); obj.label121:setParent(obj.layout31); obj.label121:setLeft(575); obj.label121:setTop(55); obj.label121:setWidth(60); obj.label121:setHeight(25); obj.label121:setText("Aptidão"); lfm_setPropAsString(obj.label121, "fontStyle", "bold"); obj.label121:setName("label121"); obj.edit182 = GUI.fromHandle(_obj_newObject("edit")); obj.edit182:setParent(obj.layout31); obj.edit182:setVertTextAlign("center"); obj.edit182:setLeft(625); obj.edit182:setTop(60); obj.edit182:setWidth(55); obj.edit182:setHeight(25); obj.edit182:setField("tipoContestP2"); obj.edit182:setName("edit182"); obj.label122 = GUI.fromHandle(_obj_newObject("label")); obj.label122:setParent(obj.layout31); obj.label122:setLeft(685); obj.label122:setTop(55); obj.label122:setWidth(40); obj.label122:setHeight(25); obj.label122:setText("Conc."); lfm_setPropAsString(obj.label122, "fontStyle", "bold"); obj.label122:setName("label122"); obj.edit183 = GUI.fromHandle(_obj_newObject("edit")); obj.edit183:setParent(obj.layout31); obj.edit183:setVertTextAlign("center"); obj.edit183:setLeft(730); obj.edit183:setTop(60); obj.edit183:setWidth(125); obj.edit183:setHeight(25); obj.edit183:setField("efeitoContestP2"); obj.edit183:setName("edit183"); obj.layout32 = GUI.fromHandle(_obj_newObject("layout")); obj.layout32:setParent(obj.layout29); obj.layout32:setLeft(2); obj.layout32:setTop(192); obj.layout32:setWidth(880); obj.layout32:setHeight(92); obj.layout32:setName("layout32"); obj.rectangle47 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle47:setParent(obj.layout32); obj.rectangle47:setAlign("client"); obj.rectangle47:setColor("black"); obj.rectangle47:setName("rectangle47"); obj.label123 = GUI.fromHandle(_obj_newObject("label")); obj.label123:setParent(obj.layout32); obj.label123:setLeft(5); obj.label123:setTop(5); obj.label123:setWidth(70); obj.label123:setHeight(25); obj.label123:setText("Golpe"); lfm_setPropAsString(obj.label123, "fontStyle", "bold"); obj.label123:setName("label123"); obj.edit184 = GUI.fromHandle(_obj_newObject("edit")); obj.edit184:setParent(obj.layout32); obj.edit184:setVertTextAlign("center"); obj.edit184:setLeft(75); obj.edit184:setTop(5); obj.edit184:setWidth(160); obj.edit184:setHeight(25); obj.edit184:setField("golpeP3"); obj.edit184:setName("edit184"); obj.label124 = GUI.fromHandle(_obj_newObject("label")); obj.label124:setParent(obj.layout32); obj.label124:setLeft(5); obj.label124:setTop(30); obj.label124:setWidth(80); obj.label124:setHeight(25); obj.label124:setText("Descritores"); lfm_setPropAsString(obj.label124, "fontStyle", "bold"); obj.label124:setName("label124"); obj.edit185 = GUI.fromHandle(_obj_newObject("edit")); obj.edit185:setParent(obj.layout32); obj.edit185:setVertTextAlign("center"); obj.edit185:setLeft(75); obj.edit185:setTop(30); obj.edit185:setWidth(160); obj.edit185:setHeight(25); obj.edit185:setField("DescritoresP3"); obj.edit185:setName("edit185"); obj.label125 = GUI.fromHandle(_obj_newObject("label")); obj.label125:setParent(obj.layout32); obj.label125:setLeft(5); obj.label125:setTop(55); obj.label125:setWidth(70); obj.label125:setHeight(25); obj.label125:setText("Alcance"); lfm_setPropAsString(obj.label125, "fontStyle", "bold"); obj.label125:setName("label125"); obj.edit186 = GUI.fromHandle(_obj_newObject("edit")); obj.edit186:setParent(obj.layout32); obj.edit186:setVertTextAlign("center"); obj.edit186:setLeft(75); obj.edit186:setTop(55); obj.edit186:setWidth(160); obj.edit186:setHeight(25); obj.edit186:setField("alcanceP3"); obj.edit186:setName("edit186"); obj.label126 = GUI.fromHandle(_obj_newObject("label")); obj.label126:setParent(obj.layout32); obj.label126:setLeft(240); obj.label126:setTop(6); obj.label126:setWidth(50); obj.label126:setHeight(25); obj.label126:setText("Tipo"); lfm_setPropAsString(obj.label126, "fontStyle", "bold"); obj.label126:setName("label126"); obj.edit187 = GUI.fromHandle(_obj_newObject("edit")); obj.edit187:setParent(obj.layout32); obj.edit187:setVertTextAlign("center"); obj.edit187:setLeft(282); obj.edit187:setTop(6); obj.edit187:setWidth(82); obj.edit187:setHeight(25); obj.edit187:setField("tipoP3"); obj.edit187:setName("edit187"); obj.label127 = GUI.fromHandle(_obj_newObject("label")); obj.label127:setParent(obj.layout32); obj.label127:setLeft(240); obj.label127:setTop(31); obj.label127:setWidth(50); obj.label127:setHeight(25); obj.label127:setText("Classe"); lfm_setPropAsString(obj.label127, "fontStyle", "bold"); obj.label127:setName("label127"); obj.comboBox15 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox15:setParent(obj.layout32); obj.comboBox15:setLeft(282); obj.comboBox15:setTop(31); obj.comboBox15:setWidth(82); obj.comboBox15:setHeight(25); obj.comboBox15:setField("classeP3"); obj.comboBox15:setHorzTextAlign("center"); obj.comboBox15:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox15:setValues({'1', '2', '3'}); obj.comboBox15:setName("comboBox15"); obj.label128 = GUI.fromHandle(_obj_newObject("label")); obj.label128:setParent(obj.layout32); obj.label128:setLeft(240); obj.label128:setTop(55); obj.label128:setWidth(50); obj.label128:setHeight(25); obj.label128:setText("Freq."); lfm_setPropAsString(obj.label128, "fontStyle", "bold"); obj.label128:setName("label128"); obj.edit188 = GUI.fromHandle(_obj_newObject("edit")); obj.edit188:setParent(obj.layout32); obj.edit188:setVertTextAlign("center"); obj.edit188:setLeft(282); obj.edit188:setTop(55); obj.edit188:setWidth(82); obj.edit188:setHeight(25); obj.edit188:setField("frequenciaP3"); obj.edit188:setName("edit188"); obj.label129 = GUI.fromHandle(_obj_newObject("label")); obj.label129:setParent(obj.layout32); obj.label129:setLeft(370); obj.label129:setTop(6); obj.label129:setWidth(70); obj.label129:setHeight(25); obj.label129:setText("Acurácia"); lfm_setPropAsString(obj.label129, "fontStyle", "bold"); obj.label129:setName("label129"); obj.edit189 = GUI.fromHandle(_obj_newObject("edit")); obj.edit189:setParent(obj.layout32); obj.edit189:setVertTextAlign("center"); obj.edit189:setLeft(425); obj.edit189:setTop(6); obj.edit189:setWidth(53); obj.edit189:setHeight(25); obj.edit189:setField("AccP3"); obj.edit189:setType("number"); obj.edit189:setName("edit189"); obj.label130 = GUI.fromHandle(_obj_newObject("label")); obj.label130:setParent(obj.layout32); obj.label130:setLeft(370); obj.label130:setTop(31); obj.label130:setWidth(70); obj.label130:setHeight(25); obj.label130:setText("Prec.Bôn."); lfm_setPropAsString(obj.label130, "fontStyle", "bold"); obj.label130:setName("label130"); obj.edit190 = GUI.fromHandle(_obj_newObject("edit")); obj.edit190:setParent(obj.layout32); obj.edit190:setVertTextAlign("center"); obj.edit190:setLeft(425); obj.edit190:setTop(31); obj.edit190:setWidth(53); obj.edit190:setHeight(25); obj.edit190:setField("ataqueP3"); obj.edit190:setType("number"); obj.edit190:setName("edit190"); obj.label131 = GUI.fromHandle(_obj_newObject("label")); obj.label131:setParent(obj.layout32); obj.label131:setLeft(370); obj.label131:setTop(55); obj.label131:setWidth(70); obj.label131:setHeight(25); obj.label131:setText("D. Base"); lfm_setPropAsString(obj.label131, "fontStyle", "bold"); obj.label131:setName("label131"); obj.edit191 = GUI.fromHandle(_obj_newObject("edit")); obj.edit191:setParent(obj.layout32); obj.edit191:setVertTextAlign("center"); obj.edit191:setLeft(425); obj.edit191:setTop(55); obj.edit191:setWidth(53); obj.edit191:setHeight(25); obj.edit191:setField("danoP3"); obj.edit191:setName("edit191"); obj.button17 = GUI.fromHandle(_obj_newObject("button")); obj.button17:setParent(obj.layout32); obj.button17:setLeft(488); obj.button17:setTop(6); obj.button17:setWidth(82); obj.button17:setText("Acerto"); obj.button17:setFontSize(11); lfm_setPropAsString(obj.button17, "fontStyle", "bold"); obj.button17:setName("button17"); obj.button18 = GUI.fromHandle(_obj_newObject("button")); obj.button18:setParent(obj.layout32); obj.button18:setLeft(488); obj.button18:setTop(31); obj.button18:setWidth(82); obj.button18:setText("Dano"); obj.button18:setFontSize(11); lfm_setPropAsString(obj.button18, "fontStyle", "bold"); obj.button18:setName("button18"); obj.button19 = GUI.fromHandle(_obj_newObject("button")); obj.button19:setParent(obj.layout32); obj.button19:setLeft(488); obj.button19:setTop(55); obj.button19:setWidth(82); obj.button19:setText("Crítico"); obj.button19:setFontSize(11); lfm_setPropAsString(obj.button19, "fontStyle", "bold"); obj.button19:setName("button19"); obj.textEditor4 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor4:setParent(obj.layout32); obj.textEditor4:setLeft(575); obj.textEditor4:setTop(5); obj.textEditor4:setWidth(280); obj.textEditor4:setHeight(50); obj.textEditor4:setField("campoEfeitoGolpesP3"); obj.textEditor4:setName("textEditor4"); obj.label132 = GUI.fromHandle(_obj_newObject("label")); obj.label132:setParent(obj.layout32); obj.label132:setLeft(575); obj.label132:setTop(55); obj.label132:setWidth(60); obj.label132:setHeight(25); obj.label132:setText("Aptidão"); lfm_setPropAsString(obj.label132, "fontStyle", "bold"); obj.label132:setName("label132"); obj.edit192 = GUI.fromHandle(_obj_newObject("edit")); obj.edit192:setParent(obj.layout32); obj.edit192:setVertTextAlign("center"); obj.edit192:setLeft(625); obj.edit192:setTop(60); obj.edit192:setWidth(55); obj.edit192:setHeight(25); obj.edit192:setField("tipoContestP3"); obj.edit192:setName("edit192"); obj.label133 = GUI.fromHandle(_obj_newObject("label")); obj.label133:setParent(obj.layout32); obj.label133:setLeft(685); obj.label133:setTop(55); obj.label133:setWidth(40); obj.label133:setHeight(25); obj.label133:setText("Conc."); lfm_setPropAsString(obj.label133, "fontStyle", "bold"); obj.label133:setName("label133"); obj.edit193 = GUI.fromHandle(_obj_newObject("edit")); obj.edit193:setParent(obj.layout32); obj.edit193:setVertTextAlign("center"); obj.edit193:setLeft(730); obj.edit193:setTop(60); obj.edit193:setWidth(125); obj.edit193:setHeight(25); obj.edit193:setField("efeitoContestP3"); obj.edit193:setName("edit193"); obj.layout33 = GUI.fromHandle(_obj_newObject("layout")); obj.layout33:setParent(obj.layout29); obj.layout33:setLeft(2); obj.layout33:setTop(288); obj.layout33:setWidth(880); obj.layout33:setHeight(92); obj.layout33:setName("layout33"); obj.rectangle48 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle48:setParent(obj.layout33); obj.rectangle48:setAlign("client"); obj.rectangle48:setColor("black"); obj.rectangle48:setName("rectangle48"); obj.label134 = GUI.fromHandle(_obj_newObject("label")); obj.label134:setParent(obj.layout33); obj.label134:setLeft(5); obj.label134:setTop(5); obj.label134:setWidth(70); obj.label134:setHeight(25); obj.label134:setText("Golpe"); lfm_setPropAsString(obj.label134, "fontStyle", "bold"); obj.label134:setName("label134"); obj.edit194 = GUI.fromHandle(_obj_newObject("edit")); obj.edit194:setParent(obj.layout33); obj.edit194:setVertTextAlign("center"); obj.edit194:setLeft(75); obj.edit194:setTop(5); obj.edit194:setWidth(160); obj.edit194:setHeight(25); obj.edit194:setField("golpeP4"); obj.edit194:setName("edit194"); obj.label135 = GUI.fromHandle(_obj_newObject("label")); obj.label135:setParent(obj.layout33); obj.label135:setLeft(5); obj.label135:setTop(30); obj.label135:setWidth(80); obj.label135:setHeight(25); obj.label135:setText("Descritores"); lfm_setPropAsString(obj.label135, "fontStyle", "bold"); obj.label135:setName("label135"); obj.edit195 = GUI.fromHandle(_obj_newObject("edit")); obj.edit195:setParent(obj.layout33); obj.edit195:setVertTextAlign("center"); obj.edit195:setLeft(75); obj.edit195:setTop(30); obj.edit195:setWidth(160); obj.edit195:setHeight(25); obj.edit195:setField("DescritoresP4"); obj.edit195:setName("edit195"); obj.label136 = GUI.fromHandle(_obj_newObject("label")); obj.label136:setParent(obj.layout33); obj.label136:setLeft(5); obj.label136:setTop(55); obj.label136:setWidth(70); obj.label136:setHeight(25); obj.label136:setText("Alcance"); lfm_setPropAsString(obj.label136, "fontStyle", "bold"); obj.label136:setName("label136"); obj.edit196 = GUI.fromHandle(_obj_newObject("edit")); obj.edit196:setParent(obj.layout33); obj.edit196:setVertTextAlign("center"); obj.edit196:setLeft(75); obj.edit196:setTop(55); obj.edit196:setWidth(160); obj.edit196:setHeight(25); obj.edit196:setField("alcanceP4"); obj.edit196:setName("edit196"); obj.label137 = GUI.fromHandle(_obj_newObject("label")); obj.label137:setParent(obj.layout33); obj.label137:setLeft(240); obj.label137:setTop(6); obj.label137:setWidth(50); obj.label137:setHeight(25); obj.label137:setText("Tipo"); lfm_setPropAsString(obj.label137, "fontStyle", "bold"); obj.label137:setName("label137"); obj.edit197 = GUI.fromHandle(_obj_newObject("edit")); obj.edit197:setParent(obj.layout33); obj.edit197:setVertTextAlign("center"); obj.edit197:setLeft(282); obj.edit197:setTop(6); obj.edit197:setWidth(82); obj.edit197:setHeight(25); obj.edit197:setField("tipoP4"); obj.edit197:setName("edit197"); obj.label138 = GUI.fromHandle(_obj_newObject("label")); obj.label138:setParent(obj.layout33); obj.label138:setLeft(240); obj.label138:setTop(31); obj.label138:setWidth(50); obj.label138:setHeight(25); obj.label138:setText("Classe"); lfm_setPropAsString(obj.label138, "fontStyle", "bold"); obj.label138:setName("label138"); obj.comboBox16 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox16:setParent(obj.layout33); obj.comboBox16:setLeft(282); obj.comboBox16:setTop(31); obj.comboBox16:setWidth(82); obj.comboBox16:setHeight(25); obj.comboBox16:setField("classeP4"); obj.comboBox16:setHorzTextAlign("center"); obj.comboBox16:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox16:setValues({'1', '2', '3'}); obj.comboBox16:setName("comboBox16"); obj.label139 = GUI.fromHandle(_obj_newObject("label")); obj.label139:setParent(obj.layout33); obj.label139:setLeft(240); obj.label139:setTop(55); obj.label139:setWidth(50); obj.label139:setHeight(25); obj.label139:setText("Freq."); lfm_setPropAsString(obj.label139, "fontStyle", "bold"); obj.label139:setName("label139"); obj.edit198 = GUI.fromHandle(_obj_newObject("edit")); obj.edit198:setParent(obj.layout33); obj.edit198:setVertTextAlign("center"); obj.edit198:setLeft(282); obj.edit198:setTop(55); obj.edit198:setWidth(82); obj.edit198:setHeight(25); obj.edit198:setField("frequenciaP4"); obj.edit198:setName("edit198"); obj.label140 = GUI.fromHandle(_obj_newObject("label")); obj.label140:setParent(obj.layout33); obj.label140:setLeft(370); obj.label140:setTop(6); obj.label140:setWidth(70); obj.label140:setHeight(25); obj.label140:setText("Acurácia"); lfm_setPropAsString(obj.label140, "fontStyle", "bold"); obj.label140:setName("label140"); obj.edit199 = GUI.fromHandle(_obj_newObject("edit")); obj.edit199:setParent(obj.layout33); obj.edit199:setVertTextAlign("center"); obj.edit199:setLeft(425); obj.edit199:setTop(6); obj.edit199:setWidth(53); obj.edit199:setHeight(25); obj.edit199:setField("AccP4"); obj.edit199:setType("number"); obj.edit199:setName("edit199"); obj.label141 = GUI.fromHandle(_obj_newObject("label")); obj.label141:setParent(obj.layout33); obj.label141:setLeft(370); obj.label141:setTop(31); obj.label141:setWidth(70); obj.label141:setHeight(25); obj.label141:setText("Prec.Bôn."); lfm_setPropAsString(obj.label141, "fontStyle", "bold"); obj.label141:setName("label141"); obj.edit200 = GUI.fromHandle(_obj_newObject("edit")); obj.edit200:setParent(obj.layout33); obj.edit200:setVertTextAlign("center"); obj.edit200:setLeft(425); obj.edit200:setTop(31); obj.edit200:setWidth(53); obj.edit200:setHeight(25); obj.edit200:setField("ataqueP4"); obj.edit200:setType("number"); obj.edit200:setName("edit200"); obj.label142 = GUI.fromHandle(_obj_newObject("label")); obj.label142:setParent(obj.layout33); obj.label142:setLeft(370); obj.label142:setTop(55); obj.label142:setWidth(70); obj.label142:setHeight(25); obj.label142:setText("D. Base"); lfm_setPropAsString(obj.label142, "fontStyle", "bold"); obj.label142:setName("label142"); obj.edit201 = GUI.fromHandle(_obj_newObject("edit")); obj.edit201:setParent(obj.layout33); obj.edit201:setVertTextAlign("center"); obj.edit201:setLeft(425); obj.edit201:setTop(55); obj.edit201:setWidth(53); obj.edit201:setHeight(25); obj.edit201:setField("danoP4"); obj.edit201:setName("edit201"); obj.button20 = GUI.fromHandle(_obj_newObject("button")); obj.button20:setParent(obj.layout33); obj.button20:setLeft(488); obj.button20:setTop(6); obj.button20:setWidth(82); obj.button20:setText("Acerto"); obj.button20:setFontSize(11); lfm_setPropAsString(obj.button20, "fontStyle", "bold"); obj.button20:setName("button20"); obj.button21 = GUI.fromHandle(_obj_newObject("button")); obj.button21:setParent(obj.layout33); obj.button21:setLeft(488); obj.button21:setTop(31); obj.button21:setWidth(82); obj.button21:setText("Dano"); obj.button21:setFontSize(11); lfm_setPropAsString(obj.button21, "fontStyle", "bold"); obj.button21:setName("button21"); obj.button22 = GUI.fromHandle(_obj_newObject("button")); obj.button22:setParent(obj.layout33); obj.button22:setLeft(488); obj.button22:setTop(55); obj.button22:setWidth(82); obj.button22:setText("Crítico"); obj.button22:setFontSize(11); lfm_setPropAsString(obj.button22, "fontStyle", "bold"); obj.button22:setName("button22"); obj.textEditor5 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor5:setParent(obj.layout33); obj.textEditor5:setLeft(575); obj.textEditor5:setTop(5); obj.textEditor5:setWidth(280); obj.textEditor5:setHeight(50); obj.textEditor5:setField("campoEfeitoGolpesP4"); obj.textEditor5:setName("textEditor5"); obj.label143 = GUI.fromHandle(_obj_newObject("label")); obj.label143:setParent(obj.layout33); obj.label143:setLeft(575); obj.label143:setTop(55); obj.label143:setWidth(60); obj.label143:setHeight(25); obj.label143:setText("Aptidão"); lfm_setPropAsString(obj.label143, "fontStyle", "bold"); obj.label143:setName("label143"); obj.edit202 = GUI.fromHandle(_obj_newObject("edit")); obj.edit202:setParent(obj.layout33); obj.edit202:setVertTextAlign("center"); obj.edit202:setLeft(625); obj.edit202:setTop(60); obj.edit202:setWidth(55); obj.edit202:setHeight(25); obj.edit202:setField("tipoContestP4"); obj.edit202:setName("edit202"); obj.label144 = GUI.fromHandle(_obj_newObject("label")); obj.label144:setParent(obj.layout33); obj.label144:setLeft(685); obj.label144:setTop(55); obj.label144:setWidth(40); obj.label144:setHeight(25); obj.label144:setText("Conc."); lfm_setPropAsString(obj.label144, "fontStyle", "bold"); obj.label144:setName("label144"); obj.edit203 = GUI.fromHandle(_obj_newObject("edit")); obj.edit203:setParent(obj.layout33); obj.edit203:setVertTextAlign("center"); obj.edit203:setLeft(730); obj.edit203:setTop(60); obj.edit203:setWidth(125); obj.edit203:setHeight(25); obj.edit203:setField("efeitoContestP4"); obj.edit203:setName("edit203"); obj.layout34 = GUI.fromHandle(_obj_newObject("layout")); obj.layout34:setParent(obj.layout29); obj.layout34:setLeft(2); obj.layout34:setTop(383); obj.layout34:setWidth(880); obj.layout34:setHeight(92); obj.layout34:setName("layout34"); obj.rectangle49 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle49:setParent(obj.layout34); obj.rectangle49:setAlign("client"); obj.rectangle49:setColor("black"); obj.rectangle49:setName("rectangle49"); obj.label145 = GUI.fromHandle(_obj_newObject("label")); obj.label145:setParent(obj.layout34); obj.label145:setLeft(5); obj.label145:setTop(5); obj.label145:setWidth(70); obj.label145:setHeight(25); obj.label145:setText("Golpe"); lfm_setPropAsString(obj.label145, "fontStyle", "bold"); obj.label145:setName("label145"); obj.edit204 = GUI.fromHandle(_obj_newObject("edit")); obj.edit204:setParent(obj.layout34); obj.edit204:setVertTextAlign("center"); obj.edit204:setLeft(75); obj.edit204:setTop(5); obj.edit204:setWidth(160); obj.edit204:setHeight(25); obj.edit204:setField("golpeP5"); obj.edit204:setName("edit204"); obj.label146 = GUI.fromHandle(_obj_newObject("label")); obj.label146:setParent(obj.layout34); obj.label146:setLeft(5); obj.label146:setTop(30); obj.label146:setWidth(80); obj.label146:setHeight(25); obj.label146:setText("Descritores"); lfm_setPropAsString(obj.label146, "fontStyle", "bold"); obj.label146:setName("label146"); obj.edit205 = GUI.fromHandle(_obj_newObject("edit")); obj.edit205:setParent(obj.layout34); obj.edit205:setVertTextAlign("center"); obj.edit205:setLeft(75); obj.edit205:setTop(30); obj.edit205:setWidth(160); obj.edit205:setHeight(25); obj.edit205:setField("DescritoresP5"); obj.edit205:setName("edit205"); obj.label147 = GUI.fromHandle(_obj_newObject("label")); obj.label147:setParent(obj.layout34); obj.label147:setLeft(5); obj.label147:setTop(55); obj.label147:setWidth(70); obj.label147:setHeight(25); obj.label147:setText("Alcance"); lfm_setPropAsString(obj.label147, "fontStyle", "bold"); obj.label147:setName("label147"); obj.edit206 = GUI.fromHandle(_obj_newObject("edit")); obj.edit206:setParent(obj.layout34); obj.edit206:setVertTextAlign("center"); obj.edit206:setLeft(75); obj.edit206:setTop(55); obj.edit206:setWidth(160); obj.edit206:setHeight(25); obj.edit206:setField("alcanceP5"); obj.edit206:setName("edit206"); obj.label148 = GUI.fromHandle(_obj_newObject("label")); obj.label148:setParent(obj.layout34); obj.label148:setLeft(240); obj.label148:setTop(6); obj.label148:setWidth(50); obj.label148:setHeight(25); obj.label148:setText("Tipo"); lfm_setPropAsString(obj.label148, "fontStyle", "bold"); obj.label148:setName("label148"); obj.edit207 = GUI.fromHandle(_obj_newObject("edit")); obj.edit207:setParent(obj.layout34); obj.edit207:setVertTextAlign("center"); obj.edit207:setLeft(282); obj.edit207:setTop(6); obj.edit207:setWidth(82); obj.edit207:setHeight(25); obj.edit207:setField("tipoP5"); obj.edit207:setName("edit207"); obj.label149 = GUI.fromHandle(_obj_newObject("label")); obj.label149:setParent(obj.layout34); obj.label149:setLeft(240); obj.label149:setTop(31); obj.label149:setWidth(50); obj.label149:setHeight(25); obj.label149:setText("Classe"); lfm_setPropAsString(obj.label149, "fontStyle", "bold"); obj.label149:setName("label149"); obj.comboBox17 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox17:setParent(obj.layout34); obj.comboBox17:setLeft(282); obj.comboBox17:setTop(31); obj.comboBox17:setWidth(82); obj.comboBox17:setHeight(25); obj.comboBox17:setField("classeP5"); obj.comboBox17:setHorzTextAlign("center"); obj.comboBox17:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox17:setValues({'1', '2', '3'}); obj.comboBox17:setName("comboBox17"); obj.label150 = GUI.fromHandle(_obj_newObject("label")); obj.label150:setParent(obj.layout34); obj.label150:setLeft(240); obj.label150:setTop(55); obj.label150:setWidth(50); obj.label150:setHeight(25); obj.label150:setText("Freq."); lfm_setPropAsString(obj.label150, "fontStyle", "bold"); obj.label150:setName("label150"); obj.edit208 = GUI.fromHandle(_obj_newObject("edit")); obj.edit208:setParent(obj.layout34); obj.edit208:setVertTextAlign("center"); obj.edit208:setLeft(282); obj.edit208:setTop(55); obj.edit208:setWidth(82); obj.edit208:setHeight(25); obj.edit208:setField("frequenciaP5"); obj.edit208:setName("edit208"); obj.label151 = GUI.fromHandle(_obj_newObject("label")); obj.label151:setParent(obj.layout34); obj.label151:setLeft(370); obj.label151:setTop(6); obj.label151:setWidth(70); obj.label151:setHeight(25); obj.label151:setText("Acurácia"); lfm_setPropAsString(obj.label151, "fontStyle", "bold"); obj.label151:setName("label151"); obj.edit209 = GUI.fromHandle(_obj_newObject("edit")); obj.edit209:setParent(obj.layout34); obj.edit209:setVertTextAlign("center"); obj.edit209:setLeft(425); obj.edit209:setTop(6); obj.edit209:setWidth(53); obj.edit209:setHeight(25); obj.edit209:setField("AccP5"); obj.edit209:setType("number"); obj.edit209:setName("edit209"); obj.label152 = GUI.fromHandle(_obj_newObject("label")); obj.label152:setParent(obj.layout34); obj.label152:setLeft(370); obj.label152:setTop(31); obj.label152:setWidth(70); obj.label152:setHeight(25); obj.label152:setText("Prec.Bôn."); lfm_setPropAsString(obj.label152, "fontStyle", "bold"); obj.label152:setName("label152"); obj.edit210 = GUI.fromHandle(_obj_newObject("edit")); obj.edit210:setParent(obj.layout34); obj.edit210:setVertTextAlign("center"); obj.edit210:setLeft(425); obj.edit210:setTop(31); obj.edit210:setWidth(53); obj.edit210:setHeight(25); obj.edit210:setField("ataqueP5"); obj.edit210:setType("number"); obj.edit210:setName("edit210"); obj.label153 = GUI.fromHandle(_obj_newObject("label")); obj.label153:setParent(obj.layout34); obj.label153:setLeft(370); obj.label153:setTop(55); obj.label153:setWidth(70); obj.label153:setHeight(25); obj.label153:setText("D. Base"); lfm_setPropAsString(obj.label153, "fontStyle", "bold"); obj.label153:setName("label153"); obj.edit211 = GUI.fromHandle(_obj_newObject("edit")); obj.edit211:setParent(obj.layout34); obj.edit211:setVertTextAlign("center"); obj.edit211:setLeft(425); obj.edit211:setTop(55); obj.edit211:setWidth(53); obj.edit211:setHeight(25); obj.edit211:setField("danoP5"); obj.edit211:setName("edit211"); obj.button23 = GUI.fromHandle(_obj_newObject("button")); obj.button23:setParent(obj.layout34); obj.button23:setLeft(488); obj.button23:setTop(6); obj.button23:setWidth(82); obj.button23:setText("Acerto"); obj.button23:setFontSize(11); lfm_setPropAsString(obj.button23, "fontStyle", "bold"); obj.button23:setName("button23"); obj.button24 = GUI.fromHandle(_obj_newObject("button")); obj.button24:setParent(obj.layout34); obj.button24:setLeft(488); obj.button24:setTop(31); obj.button24:setWidth(82); obj.button24:setText("Dano"); obj.button24:setFontSize(11); lfm_setPropAsString(obj.button24, "fontStyle", "bold"); obj.button24:setName("button24"); obj.button25 = GUI.fromHandle(_obj_newObject("button")); obj.button25:setParent(obj.layout34); obj.button25:setLeft(488); obj.button25:setTop(55); obj.button25:setWidth(82); obj.button25:setText("Crítico"); obj.button25:setFontSize(11); lfm_setPropAsString(obj.button25, "fontStyle", "bold"); obj.button25:setName("button25"); obj.textEditor6 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor6:setParent(obj.layout34); obj.textEditor6:setLeft(575); obj.textEditor6:setTop(5); obj.textEditor6:setWidth(280); obj.textEditor6:setHeight(50); obj.textEditor6:setField("campoEfeitoGolpesP5"); obj.textEditor6:setName("textEditor6"); obj.label154 = GUI.fromHandle(_obj_newObject("label")); obj.label154:setParent(obj.layout34); obj.label154:setLeft(575); obj.label154:setTop(55); obj.label154:setWidth(60); obj.label154:setHeight(25); obj.label154:setText("Aptidão"); lfm_setPropAsString(obj.label154, "fontStyle", "bold"); obj.label154:setName("label154"); obj.edit212 = GUI.fromHandle(_obj_newObject("edit")); obj.edit212:setParent(obj.layout34); obj.edit212:setVertTextAlign("center"); obj.edit212:setLeft(625); obj.edit212:setTop(60); obj.edit212:setWidth(55); obj.edit212:setHeight(25); obj.edit212:setField("tipoContestP5"); obj.edit212:setName("edit212"); obj.label155 = GUI.fromHandle(_obj_newObject("label")); obj.label155:setParent(obj.layout34); obj.label155:setLeft(685); obj.label155:setTop(55); obj.label155:setWidth(40); obj.label155:setHeight(25); obj.label155:setText("Conc."); lfm_setPropAsString(obj.label155, "fontStyle", "bold"); obj.label155:setName("label155"); obj.edit213 = GUI.fromHandle(_obj_newObject("edit")); obj.edit213:setParent(obj.layout34); obj.edit213:setVertTextAlign("center"); obj.edit213:setLeft(730); obj.edit213:setTop(60); obj.edit213:setWidth(125); obj.edit213:setHeight(25); obj.edit213:setField("efeitoContestP5"); obj.edit213:setName("edit213"); obj.layout35 = GUI.fromHandle(_obj_newObject("layout")); obj.layout35:setParent(obj.layout29); obj.layout35:setLeft(2); obj.layout35:setTop(478); obj.layout35:setWidth(880); obj.layout35:setHeight(92); obj.layout35:setName("layout35"); obj.rectangle50 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle50:setParent(obj.layout35); obj.rectangle50:setAlign("client"); obj.rectangle50:setColor("black"); obj.rectangle50:setName("rectangle50"); obj.label156 = GUI.fromHandle(_obj_newObject("label")); obj.label156:setParent(obj.layout35); obj.label156:setLeft(5); obj.label156:setTop(5); obj.label156:setWidth(70); obj.label156:setHeight(25); obj.label156:setText("Golpe"); lfm_setPropAsString(obj.label156, "fontStyle", "bold"); obj.label156:setName("label156"); obj.edit214 = GUI.fromHandle(_obj_newObject("edit")); obj.edit214:setParent(obj.layout35); obj.edit214:setVertTextAlign("center"); obj.edit214:setLeft(75); obj.edit214:setTop(5); obj.edit214:setWidth(160); obj.edit214:setHeight(25); obj.edit214:setField("golpeP6"); obj.edit214:setName("edit214"); obj.label157 = GUI.fromHandle(_obj_newObject("label")); obj.label157:setParent(obj.layout35); obj.label157:setLeft(5); obj.label157:setTop(30); obj.label157:setWidth(80); obj.label157:setHeight(25); obj.label157:setText("Descritores"); lfm_setPropAsString(obj.label157, "fontStyle", "bold"); obj.label157:setName("label157"); obj.edit215 = GUI.fromHandle(_obj_newObject("edit")); obj.edit215:setParent(obj.layout35); obj.edit215:setVertTextAlign("center"); obj.edit215:setLeft(75); obj.edit215:setTop(30); obj.edit215:setWidth(160); obj.edit215:setHeight(25); obj.edit215:setField("DescritoresP6"); obj.edit215:setName("edit215"); obj.label158 = GUI.fromHandle(_obj_newObject("label")); obj.label158:setParent(obj.layout35); obj.label158:setLeft(5); obj.label158:setTop(55); obj.label158:setWidth(70); obj.label158:setHeight(25); obj.label158:setText("Alcance"); lfm_setPropAsString(obj.label158, "fontStyle", "bold"); obj.label158:setName("label158"); obj.edit216 = GUI.fromHandle(_obj_newObject("edit")); obj.edit216:setParent(obj.layout35); obj.edit216:setVertTextAlign("center"); obj.edit216:setLeft(75); obj.edit216:setTop(55); obj.edit216:setWidth(160); obj.edit216:setHeight(25); obj.edit216:setField("alcanceP6"); obj.edit216:setName("edit216"); obj.label159 = GUI.fromHandle(_obj_newObject("label")); obj.label159:setParent(obj.layout35); obj.label159:setLeft(240); obj.label159:setTop(6); obj.label159:setWidth(50); obj.label159:setHeight(25); obj.label159:setText("Tipo"); lfm_setPropAsString(obj.label159, "fontStyle", "bold"); obj.label159:setName("label159"); obj.edit217 = GUI.fromHandle(_obj_newObject("edit")); obj.edit217:setParent(obj.layout35); obj.edit217:setVertTextAlign("center"); obj.edit217:setLeft(282); obj.edit217:setTop(6); obj.edit217:setWidth(82); obj.edit217:setHeight(25); obj.edit217:setField("tipoP6"); obj.edit217:setName("edit217"); obj.label160 = GUI.fromHandle(_obj_newObject("label")); obj.label160:setParent(obj.layout35); obj.label160:setLeft(240); obj.label160:setTop(31); obj.label160:setWidth(50); obj.label160:setHeight(25); obj.label160:setText("Classe"); lfm_setPropAsString(obj.label160, "fontStyle", "bold"); obj.label160:setName("label160"); obj.comboBox18 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox18:setParent(obj.layout35); obj.comboBox18:setLeft(282); obj.comboBox18:setTop(31); obj.comboBox18:setWidth(82); obj.comboBox18:setHeight(25); obj.comboBox18:setField("classeP6"); obj.comboBox18:setHorzTextAlign("center"); obj.comboBox18:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox18:setValues({'1', '2', '3'}); obj.comboBox18:setName("comboBox18"); obj.label161 = GUI.fromHandle(_obj_newObject("label")); obj.label161:setParent(obj.layout35); obj.label161:setLeft(240); obj.label161:setTop(55); obj.label161:setWidth(50); obj.label161:setHeight(25); obj.label161:setText("Freq."); lfm_setPropAsString(obj.label161, "fontStyle", "bold"); obj.label161:setName("label161"); obj.edit218 = GUI.fromHandle(_obj_newObject("edit")); obj.edit218:setParent(obj.layout35); obj.edit218:setVertTextAlign("center"); obj.edit218:setLeft(282); obj.edit218:setTop(55); obj.edit218:setWidth(82); obj.edit218:setHeight(25); obj.edit218:setField("frequenciaP6"); obj.edit218:setName("edit218"); obj.label162 = GUI.fromHandle(_obj_newObject("label")); obj.label162:setParent(obj.layout35); obj.label162:setLeft(370); obj.label162:setTop(6); obj.label162:setWidth(70); obj.label162:setHeight(25); obj.label162:setText("Acurácia"); lfm_setPropAsString(obj.label162, "fontStyle", "bold"); obj.label162:setName("label162"); obj.edit219 = GUI.fromHandle(_obj_newObject("edit")); obj.edit219:setParent(obj.layout35); obj.edit219:setVertTextAlign("center"); obj.edit219:setLeft(425); obj.edit219:setTop(6); obj.edit219:setWidth(53); obj.edit219:setHeight(25); obj.edit219:setField("AccP6"); obj.edit219:setType("number"); obj.edit219:setName("edit219"); obj.label163 = GUI.fromHandle(_obj_newObject("label")); obj.label163:setParent(obj.layout35); obj.label163:setLeft(370); obj.label163:setTop(31); obj.label163:setWidth(70); obj.label163:setHeight(25); obj.label163:setText("Prec.Bôn."); lfm_setPropAsString(obj.label163, "fontStyle", "bold"); obj.label163:setName("label163"); obj.edit220 = GUI.fromHandle(_obj_newObject("edit")); obj.edit220:setParent(obj.layout35); obj.edit220:setVertTextAlign("center"); obj.edit220:setLeft(425); obj.edit220:setTop(31); obj.edit220:setWidth(53); obj.edit220:setHeight(25); obj.edit220:setField("ataqueP6"); obj.edit220:setType("number"); obj.edit220:setName("edit220"); obj.label164 = GUI.fromHandle(_obj_newObject("label")); obj.label164:setParent(obj.layout35); obj.label164:setLeft(370); obj.label164:setTop(55); obj.label164:setWidth(70); obj.label164:setHeight(25); obj.label164:setText("D. Base"); lfm_setPropAsString(obj.label164, "fontStyle", "bold"); obj.label164:setName("label164"); obj.edit221 = GUI.fromHandle(_obj_newObject("edit")); obj.edit221:setParent(obj.layout35); obj.edit221:setVertTextAlign("center"); obj.edit221:setLeft(425); obj.edit221:setTop(55); obj.edit221:setWidth(53); obj.edit221:setHeight(25); obj.edit221:setField("danoP6"); obj.edit221:setName("edit221"); obj.button26 = GUI.fromHandle(_obj_newObject("button")); obj.button26:setParent(obj.layout35); obj.button26:setLeft(488); obj.button26:setTop(6); obj.button26:setWidth(82); obj.button26:setText("Acerto"); obj.button26:setFontSize(11); lfm_setPropAsString(obj.button26, "fontStyle", "bold"); obj.button26:setName("button26"); obj.button27 = GUI.fromHandle(_obj_newObject("button")); obj.button27:setParent(obj.layout35); obj.button27:setLeft(488); obj.button27:setTop(31); obj.button27:setWidth(82); obj.button27:setText("Dano"); obj.button27:setFontSize(11); lfm_setPropAsString(obj.button27, "fontStyle", "bold"); obj.button27:setName("button27"); obj.button28 = GUI.fromHandle(_obj_newObject("button")); obj.button28:setParent(obj.layout35); obj.button28:setLeft(488); obj.button28:setTop(55); obj.button28:setWidth(82); obj.button28:setText("Crítico"); obj.button28:setFontSize(11); lfm_setPropAsString(obj.button28, "fontStyle", "bold"); obj.button28:setName("button28"); obj.textEditor7 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor7:setParent(obj.layout35); obj.textEditor7:setLeft(575); obj.textEditor7:setTop(5); obj.textEditor7:setWidth(280); obj.textEditor7:setHeight(50); obj.textEditor7:setField("campoEfeitoGolpesP6"); obj.textEditor7:setName("textEditor7"); obj.label165 = GUI.fromHandle(_obj_newObject("label")); obj.label165:setParent(obj.layout35); obj.label165:setLeft(575); obj.label165:setTop(55); obj.label165:setWidth(60); obj.label165:setHeight(25); obj.label165:setText("Aptidão"); lfm_setPropAsString(obj.label165, "fontStyle", "bold"); obj.label165:setName("label165"); obj.edit222 = GUI.fromHandle(_obj_newObject("edit")); obj.edit222:setParent(obj.layout35); obj.edit222:setVertTextAlign("center"); obj.edit222:setLeft(625); obj.edit222:setTop(60); obj.edit222:setWidth(55); obj.edit222:setHeight(25); obj.edit222:setField("tipoContestP6"); obj.edit222:setName("edit222"); obj.label166 = GUI.fromHandle(_obj_newObject("label")); obj.label166:setParent(obj.layout35); obj.label166:setLeft(685); obj.label166:setTop(55); obj.label166:setWidth(40); obj.label166:setHeight(25); obj.label166:setText("Conc."); lfm_setPropAsString(obj.label166, "fontStyle", "bold"); obj.label166:setName("label166"); obj.edit223 = GUI.fromHandle(_obj_newObject("edit")); obj.edit223:setParent(obj.layout35); obj.edit223:setVertTextAlign("center"); obj.edit223:setLeft(730); obj.edit223:setTop(60); obj.edit223:setWidth(125); obj.edit223:setHeight(25); obj.edit223:setField("efeitoContestP6"); obj.edit223:setName("edit223"); obj.layout36 = GUI.fromHandle(_obj_newObject("layout")); obj.layout36:setParent(obj.layout29); obj.layout36:setLeft(2); obj.layout36:setTop(573); obj.layout36:setWidth(880); obj.layout36:setHeight(92); obj.layout36:setName("layout36"); obj.rectangle51 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle51:setParent(obj.layout36); obj.rectangle51:setAlign("client"); obj.rectangle51:setColor("black"); obj.rectangle51:setName("rectangle51"); obj.label167 = GUI.fromHandle(_obj_newObject("label")); obj.label167:setParent(obj.layout36); obj.label167:setLeft(5); obj.label167:setTop(5); obj.label167:setWidth(70); obj.label167:setHeight(25); obj.label167:setText("Golpe"); lfm_setPropAsString(obj.label167, "fontStyle", "bold"); obj.label167:setName("label167"); obj.edit224 = GUI.fromHandle(_obj_newObject("edit")); obj.edit224:setParent(obj.layout36); obj.edit224:setVertTextAlign("center"); obj.edit224:setLeft(75); obj.edit224:setTop(5); obj.edit224:setWidth(160); obj.edit224:setHeight(25); obj.edit224:setField("golpeP7"); obj.edit224:setName("edit224"); obj.label168 = GUI.fromHandle(_obj_newObject("label")); obj.label168:setParent(obj.layout36); obj.label168:setLeft(5); obj.label168:setTop(30); obj.label168:setWidth(80); obj.label168:setHeight(25); obj.label168:setText("Descritores"); lfm_setPropAsString(obj.label168, "fontStyle", "bold"); obj.label168:setName("label168"); obj.edit225 = GUI.fromHandle(_obj_newObject("edit")); obj.edit225:setParent(obj.layout36); obj.edit225:setVertTextAlign("center"); obj.edit225:setLeft(75); obj.edit225:setTop(30); obj.edit225:setWidth(160); obj.edit225:setHeight(25); obj.edit225:setField("DescritoresP7"); obj.edit225:setName("edit225"); obj.label169 = GUI.fromHandle(_obj_newObject("label")); obj.label169:setParent(obj.layout36); obj.label169:setLeft(5); obj.label169:setTop(55); obj.label169:setWidth(70); obj.label169:setHeight(25); obj.label169:setText("Alcance"); lfm_setPropAsString(obj.label169, "fontStyle", "bold"); obj.label169:setName("label169"); obj.edit226 = GUI.fromHandle(_obj_newObject("edit")); obj.edit226:setParent(obj.layout36); obj.edit226:setVertTextAlign("center"); obj.edit226:setLeft(75); obj.edit226:setTop(55); obj.edit226:setWidth(160); obj.edit226:setHeight(25); obj.edit226:setField("alcanceP7"); obj.edit226:setName("edit226"); obj.label170 = GUI.fromHandle(_obj_newObject("label")); obj.label170:setParent(obj.layout36); obj.label170:setLeft(240); obj.label170:setTop(6); obj.label170:setWidth(50); obj.label170:setHeight(25); obj.label170:setText("Tipo"); lfm_setPropAsString(obj.label170, "fontStyle", "bold"); obj.label170:setName("label170"); obj.edit227 = GUI.fromHandle(_obj_newObject("edit")); obj.edit227:setParent(obj.layout36); obj.edit227:setVertTextAlign("center"); obj.edit227:setLeft(282); obj.edit227:setTop(6); obj.edit227:setWidth(82); obj.edit227:setHeight(25); obj.edit227:setField("tipoP7"); obj.edit227:setName("edit227"); obj.label171 = GUI.fromHandle(_obj_newObject("label")); obj.label171:setParent(obj.layout36); obj.label171:setLeft(240); obj.label171:setTop(31); obj.label171:setWidth(50); obj.label171:setHeight(25); obj.label171:setText("Classe"); lfm_setPropAsString(obj.label171, "fontStyle", "bold"); obj.label171:setName("label171"); obj.comboBox19 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox19:setParent(obj.layout36); obj.comboBox19:setLeft(282); obj.comboBox19:setTop(31); obj.comboBox19:setWidth(82); obj.comboBox19:setHeight(25); obj.comboBox19:setField("classeP7"); obj.comboBox19:setHorzTextAlign("center"); obj.comboBox19:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox19:setValues({'1', '2', '3'}); obj.comboBox19:setName("comboBox19"); obj.label172 = GUI.fromHandle(_obj_newObject("label")); obj.label172:setParent(obj.layout36); obj.label172:setLeft(240); obj.label172:setTop(55); obj.label172:setWidth(50); obj.label172:setHeight(25); obj.label172:setText("Freq."); lfm_setPropAsString(obj.label172, "fontStyle", "bold"); obj.label172:setName("label172"); obj.edit228 = GUI.fromHandle(_obj_newObject("edit")); obj.edit228:setParent(obj.layout36); obj.edit228:setVertTextAlign("center"); obj.edit228:setLeft(282); obj.edit228:setTop(55); obj.edit228:setWidth(82); obj.edit228:setHeight(25); obj.edit228:setField("frequenciaP7"); obj.edit228:setName("edit228"); obj.label173 = GUI.fromHandle(_obj_newObject("label")); obj.label173:setParent(obj.layout36); obj.label173:setLeft(370); obj.label173:setTop(6); obj.label173:setWidth(70); obj.label173:setHeight(25); obj.label173:setText("Acurácia"); lfm_setPropAsString(obj.label173, "fontStyle", "bold"); obj.label173:setName("label173"); obj.edit229 = GUI.fromHandle(_obj_newObject("edit")); obj.edit229:setParent(obj.layout36); obj.edit229:setVertTextAlign("center"); obj.edit229:setLeft(425); obj.edit229:setTop(6); obj.edit229:setWidth(53); obj.edit229:setHeight(25); obj.edit229:setField("AccP7"); obj.edit229:setType("number"); obj.edit229:setName("edit229"); obj.label174 = GUI.fromHandle(_obj_newObject("label")); obj.label174:setParent(obj.layout36); obj.label174:setLeft(370); obj.label174:setTop(31); obj.label174:setWidth(70); obj.label174:setHeight(25); obj.label174:setText("Prec.Bôn."); lfm_setPropAsString(obj.label174, "fontStyle", "bold"); obj.label174:setName("label174"); obj.edit230 = GUI.fromHandle(_obj_newObject("edit")); obj.edit230:setParent(obj.layout36); obj.edit230:setVertTextAlign("center"); obj.edit230:setLeft(425); obj.edit230:setTop(31); obj.edit230:setWidth(53); obj.edit230:setHeight(25); obj.edit230:setField("ataqueP7"); obj.edit230:setType("number"); obj.edit230:setName("edit230"); obj.label175 = GUI.fromHandle(_obj_newObject("label")); obj.label175:setParent(obj.layout36); obj.label175:setLeft(370); obj.label175:setTop(55); obj.label175:setWidth(70); obj.label175:setHeight(25); obj.label175:setText("D. Base"); lfm_setPropAsString(obj.label175, "fontStyle", "bold"); obj.label175:setName("label175"); obj.edit231 = GUI.fromHandle(_obj_newObject("edit")); obj.edit231:setParent(obj.layout36); obj.edit231:setVertTextAlign("center"); obj.edit231:setLeft(425); obj.edit231:setTop(55); obj.edit231:setWidth(53); obj.edit231:setHeight(25); obj.edit231:setField("danoP7"); obj.edit231:setName("edit231"); obj.button29 = GUI.fromHandle(_obj_newObject("button")); obj.button29:setParent(obj.layout36); obj.button29:setLeft(488); obj.button29:setTop(6); obj.button29:setWidth(82); obj.button29:setText("Acerto"); obj.button29:setFontSize(11); lfm_setPropAsString(obj.button29, "fontStyle", "bold"); obj.button29:setName("button29"); obj.button30 = GUI.fromHandle(_obj_newObject("button")); obj.button30:setParent(obj.layout36); obj.button30:setLeft(488); obj.button30:setTop(31); obj.button30:setWidth(82); obj.button30:setText("Dano"); obj.button30:setFontSize(11); lfm_setPropAsString(obj.button30, "fontStyle", "bold"); obj.button30:setName("button30"); obj.button31 = GUI.fromHandle(_obj_newObject("button")); obj.button31:setParent(obj.layout36); obj.button31:setLeft(488); obj.button31:setTop(55); obj.button31:setWidth(82); obj.button31:setText("Crítico"); obj.button31:setFontSize(11); lfm_setPropAsString(obj.button31, "fontStyle", "bold"); obj.button31:setName("button31"); obj.textEditor8 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor8:setParent(obj.layout36); obj.textEditor8:setLeft(575); obj.textEditor8:setTop(5); obj.textEditor8:setWidth(280); obj.textEditor8:setHeight(50); obj.textEditor8:setField("campoEfeitoGolpesP7"); obj.textEditor8:setName("textEditor8"); obj.label176 = GUI.fromHandle(_obj_newObject("label")); obj.label176:setParent(obj.layout36); obj.label176:setLeft(575); obj.label176:setTop(55); obj.label176:setWidth(60); obj.label176:setHeight(25); obj.label176:setText("Aptidão"); lfm_setPropAsString(obj.label176, "fontStyle", "bold"); obj.label176:setName("label176"); obj.edit232 = GUI.fromHandle(_obj_newObject("edit")); obj.edit232:setParent(obj.layout36); obj.edit232:setVertTextAlign("center"); obj.edit232:setLeft(625); obj.edit232:setTop(60); obj.edit232:setWidth(55); obj.edit232:setHeight(25); obj.edit232:setField("tipoContestP7"); obj.edit232:setName("edit232"); obj.label177 = GUI.fromHandle(_obj_newObject("label")); obj.label177:setParent(obj.layout36); obj.label177:setLeft(685); obj.label177:setTop(55); obj.label177:setWidth(40); obj.label177:setHeight(25); obj.label177:setText("Conc."); lfm_setPropAsString(obj.label177, "fontStyle", "bold"); obj.label177:setName("label177"); obj.edit233 = GUI.fromHandle(_obj_newObject("edit")); obj.edit233:setParent(obj.layout36); obj.edit233:setVertTextAlign("center"); obj.edit233:setLeft(730); obj.edit233:setTop(60); obj.edit233:setWidth(125); obj.edit233:setHeight(25); obj.edit233:setField("efeitoContestP7"); obj.edit233:setName("edit233"); obj.layout37 = GUI.fromHandle(_obj_newObject("layout")); obj.layout37:setParent(obj.layout29); obj.layout37:setLeft(2); obj.layout37:setTop(668); obj.layout37:setWidth(880); obj.layout37:setHeight(92); obj.layout37:setName("layout37"); obj.rectangle52 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle52:setParent(obj.layout37); obj.rectangle52:setAlign("client"); obj.rectangle52:setColor("black"); obj.rectangle52:setName("rectangle52"); obj.label178 = GUI.fromHandle(_obj_newObject("label")); obj.label178:setParent(obj.layout37); obj.label178:setLeft(5); obj.label178:setTop(5); obj.label178:setWidth(70); obj.label178:setHeight(25); obj.label178:setText("Golpe"); lfm_setPropAsString(obj.label178, "fontStyle", "bold"); obj.label178:setName("label178"); obj.edit234 = GUI.fromHandle(_obj_newObject("edit")); obj.edit234:setParent(obj.layout37); obj.edit234:setVertTextAlign("center"); obj.edit234:setLeft(75); obj.edit234:setTop(5); obj.edit234:setWidth(160); obj.edit234:setHeight(25); obj.edit234:setField("golpeP8"); obj.edit234:setName("edit234"); obj.label179 = GUI.fromHandle(_obj_newObject("label")); obj.label179:setParent(obj.layout37); obj.label179:setLeft(5); obj.label179:setTop(30); obj.label179:setWidth(80); obj.label179:setHeight(25); obj.label179:setText("Descritores"); lfm_setPropAsString(obj.label179, "fontStyle", "bold"); obj.label179:setName("label179"); obj.edit235 = GUI.fromHandle(_obj_newObject("edit")); obj.edit235:setParent(obj.layout37); obj.edit235:setVertTextAlign("center"); obj.edit235:setLeft(75); obj.edit235:setTop(30); obj.edit235:setWidth(160); obj.edit235:setHeight(25); obj.edit235:setField("DescritoresP8"); obj.edit235:setName("edit235"); obj.label180 = GUI.fromHandle(_obj_newObject("label")); obj.label180:setParent(obj.layout37); obj.label180:setLeft(5); obj.label180:setTop(55); obj.label180:setWidth(70); obj.label180:setHeight(25); obj.label180:setText("Alcance"); lfm_setPropAsString(obj.label180, "fontStyle", "bold"); obj.label180:setName("label180"); obj.edit236 = GUI.fromHandle(_obj_newObject("edit")); obj.edit236:setParent(obj.layout37); obj.edit236:setVertTextAlign("center"); obj.edit236:setLeft(75); obj.edit236:setTop(55); obj.edit236:setWidth(160); obj.edit236:setHeight(25); obj.edit236:setField("alcanceP8"); obj.edit236:setName("edit236"); obj.label181 = GUI.fromHandle(_obj_newObject("label")); obj.label181:setParent(obj.layout37); obj.label181:setLeft(240); obj.label181:setTop(6); obj.label181:setWidth(50); obj.label181:setHeight(25); obj.label181:setText("Tipo"); lfm_setPropAsString(obj.label181, "fontStyle", "bold"); obj.label181:setName("label181"); obj.edit237 = GUI.fromHandle(_obj_newObject("edit")); obj.edit237:setParent(obj.layout37); obj.edit237:setVertTextAlign("center"); obj.edit237:setLeft(282); obj.edit237:setTop(6); obj.edit237:setWidth(82); obj.edit237:setHeight(25); obj.edit237:setField("tipoP8"); obj.edit237:setName("edit237"); obj.label182 = GUI.fromHandle(_obj_newObject("label")); obj.label182:setParent(obj.layout37); obj.label182:setLeft(240); obj.label182:setTop(31); obj.label182:setWidth(50); obj.label182:setHeight(25); obj.label182:setText("Classe"); lfm_setPropAsString(obj.label182, "fontStyle", "bold"); obj.label182:setName("label182"); obj.comboBox20 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox20:setParent(obj.layout37); obj.comboBox20:setLeft(282); obj.comboBox20:setTop(31); obj.comboBox20:setWidth(82); obj.comboBox20:setHeight(25); obj.comboBox20:setField("classeP8"); obj.comboBox20:setHorzTextAlign("center"); obj.comboBox20:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox20:setValues({'1', '2', '3'}); obj.comboBox20:setName("comboBox20"); obj.label183 = GUI.fromHandle(_obj_newObject("label")); obj.label183:setParent(obj.layout37); obj.label183:setLeft(240); obj.label183:setTop(55); obj.label183:setWidth(50); obj.label183:setHeight(25); obj.label183:setText("Freq."); lfm_setPropAsString(obj.label183, "fontStyle", "bold"); obj.label183:setName("label183"); obj.edit238 = GUI.fromHandle(_obj_newObject("edit")); obj.edit238:setParent(obj.layout37); obj.edit238:setVertTextAlign("center"); obj.edit238:setLeft(282); obj.edit238:setTop(55); obj.edit238:setWidth(82); obj.edit238:setHeight(25); obj.edit238:setField("frequenciaP8"); obj.edit238:setName("edit238"); obj.label184 = GUI.fromHandle(_obj_newObject("label")); obj.label184:setParent(obj.layout37); obj.label184:setLeft(370); obj.label184:setTop(6); obj.label184:setWidth(70); obj.label184:setHeight(25); obj.label184:setText("Acurácia"); lfm_setPropAsString(obj.label184, "fontStyle", "bold"); obj.label184:setName("label184"); obj.edit239 = GUI.fromHandle(_obj_newObject("edit")); obj.edit239:setParent(obj.layout37); obj.edit239:setVertTextAlign("center"); obj.edit239:setLeft(425); obj.edit239:setTop(6); obj.edit239:setWidth(53); obj.edit239:setHeight(25); obj.edit239:setField("AccP8"); obj.edit239:setType("number"); obj.edit239:setName("edit239"); obj.label185 = GUI.fromHandle(_obj_newObject("label")); obj.label185:setParent(obj.layout37); obj.label185:setLeft(370); obj.label185:setTop(31); obj.label185:setWidth(70); obj.label185:setHeight(25); obj.label185:setText("Prec.Bôn."); lfm_setPropAsString(obj.label185, "fontStyle", "bold"); obj.label185:setName("label185"); obj.edit240 = GUI.fromHandle(_obj_newObject("edit")); obj.edit240:setParent(obj.layout37); obj.edit240:setVertTextAlign("center"); obj.edit240:setLeft(425); obj.edit240:setTop(31); obj.edit240:setWidth(53); obj.edit240:setHeight(25); obj.edit240:setField("ataqueP8"); obj.edit240:setType("number"); obj.edit240:setName("edit240"); obj.label186 = GUI.fromHandle(_obj_newObject("label")); obj.label186:setParent(obj.layout37); obj.label186:setLeft(370); obj.label186:setTop(55); obj.label186:setWidth(70); obj.label186:setHeight(25); obj.label186:setText("D. Base"); lfm_setPropAsString(obj.label186, "fontStyle", "bold"); obj.label186:setName("label186"); obj.edit241 = GUI.fromHandle(_obj_newObject("edit")); obj.edit241:setParent(obj.layout37); obj.edit241:setVertTextAlign("center"); obj.edit241:setLeft(425); obj.edit241:setTop(55); obj.edit241:setWidth(53); obj.edit241:setHeight(25); obj.edit241:setField("danoP8"); obj.edit241:setName("edit241"); obj.button32 = GUI.fromHandle(_obj_newObject("button")); obj.button32:setParent(obj.layout37); obj.button32:setLeft(488); obj.button32:setTop(6); obj.button32:setWidth(82); obj.button32:setText("Acerto"); obj.button32:setFontSize(11); lfm_setPropAsString(obj.button32, "fontStyle", "bold"); obj.button32:setName("button32"); obj.button33 = GUI.fromHandle(_obj_newObject("button")); obj.button33:setParent(obj.layout37); obj.button33:setLeft(488); obj.button33:setTop(31); obj.button33:setWidth(82); obj.button33:setText("Dano"); obj.button33:setFontSize(11); lfm_setPropAsString(obj.button33, "fontStyle", "bold"); obj.button33:setName("button33"); obj.button34 = GUI.fromHandle(_obj_newObject("button")); obj.button34:setParent(obj.layout37); obj.button34:setLeft(488); obj.button34:setTop(55); obj.button34:setWidth(82); obj.button34:setText("Crítico"); obj.button34:setFontSize(11); lfm_setPropAsString(obj.button34, "fontStyle", "bold"); obj.button34:setName("button34"); obj.textEditor9 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor9:setParent(obj.layout37); obj.textEditor9:setLeft(575); obj.textEditor9:setTop(5); obj.textEditor9:setWidth(280); obj.textEditor9:setHeight(50); obj.textEditor9:setField("campoEfeitoGolpesP8"); obj.textEditor9:setName("textEditor9"); obj.label187 = GUI.fromHandle(_obj_newObject("label")); obj.label187:setParent(obj.layout37); obj.label187:setLeft(575); obj.label187:setTop(55); obj.label187:setWidth(60); obj.label187:setHeight(25); obj.label187:setText("Aptidão"); lfm_setPropAsString(obj.label187, "fontStyle", "bold"); obj.label187:setName("label187"); obj.edit242 = GUI.fromHandle(_obj_newObject("edit")); obj.edit242:setParent(obj.layout37); obj.edit242:setVertTextAlign("center"); obj.edit242:setLeft(625); obj.edit242:setTop(60); obj.edit242:setWidth(55); obj.edit242:setHeight(25); obj.edit242:setField("tipoContestP8"); obj.edit242:setName("edit242"); obj.label188 = GUI.fromHandle(_obj_newObject("label")); obj.label188:setParent(obj.layout37); obj.label188:setLeft(685); obj.label188:setTop(55); obj.label188:setWidth(40); obj.label188:setHeight(25); obj.label188:setText("Conc."); lfm_setPropAsString(obj.label188, "fontStyle", "bold"); obj.label188:setName("label188"); obj.edit243 = GUI.fromHandle(_obj_newObject("edit")); obj.edit243:setParent(obj.layout37); obj.edit243:setVertTextAlign("center"); obj.edit243:setLeft(730); obj.edit243:setTop(60); obj.edit243:setWidth(125); obj.edit243:setHeight(25); obj.edit243:setField("efeitoContestP8"); obj.edit243:setName("edit243"); obj.tab5 = GUI.fromHandle(_obj_newObject("tab")); obj.tab5:setParent(obj.tabControl2); obj.tab5:setTitle("Habilidades e Capacidades"); obj.tab5:setName("tab5"); obj.frmPokemon4 = GUI.fromHandle(_obj_newObject("form")); obj.frmPokemon4:setParent(obj.tab5); obj.frmPokemon4:setName("frmPokemon4"); obj.frmPokemon4:setAlign("client"); obj.frmPokemon4:setTheme("dark"); obj.frmPokemon4:setMargins({top=1}); obj.rectangle53 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle53:setParent(obj.frmPokemon4); obj.rectangle53:setAlign("top"); obj.rectangle53:setColor("black"); obj.rectangle53:setXradius(10); obj.rectangle53:setYradius(10); obj.rectangle53:setHeight(880); obj.rectangle53:setPadding({top=3, left=3, right=3, bottom=3}); obj.rectangle53:setName("rectangle53"); obj.layout38 = GUI.fromHandle(_obj_newObject("layout")); obj.layout38:setParent(obj.rectangle53); obj.layout38:setLeft(10); obj.layout38:setTop(10); obj.layout38:setHeight(600); obj.layout38:setWidth(410); obj.layout38:setName("layout38"); obj.rectangle54 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle54:setParent(obj.layout38); obj.rectangle54:setLeft(000); obj.rectangle54:setTop(000); obj.rectangle54:setWidth(415); obj.rectangle54:setHeight(500); obj.rectangle54:setColor("darkred"); obj.rectangle54:setStrokeColor("black"); obj.rectangle54:setStrokeSize(5); obj.rectangle54:setName("rectangle54"); obj.label189 = GUI.fromHandle(_obj_newObject("label")); obj.label189:setParent(obj.layout38); obj.label189:setLeft(000); obj.label189:setTop(005); obj.label189:setHeight(20); obj.label189:setWidth(405); obj.label189:setFontColor("White"); obj.label189:setFontSize(18); obj.label189:setText("Habilidades"); obj.label189:setAutoSize(true); obj.label189:setHorzTextAlign("center"); obj.label189:setName("label189"); obj.textEditor10 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor10:setParent(obj.layout38); obj.textEditor10:setLeft(07); obj.textEditor10:setTop(30); obj.textEditor10:setWidth(400); obj.textEditor10:setHeight(460); obj.textEditor10:setField("campoHabilidades2"); obj.textEditor10:setName("textEditor10"); obj.layout39 = GUI.fromHandle(_obj_newObject("layout")); obj.layout39:setParent(obj.rectangle53); obj.layout39:setLeft(460); obj.layout39:setTop(10); obj.layout39:setHeight(600); obj.layout39:setWidth(410); obj.layout39:setName("layout39"); obj.rectangle55 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle55:setParent(obj.layout39); obj.rectangle55:setLeft(000); obj.rectangle55:setTop(000); obj.rectangle55:setWidth(415); obj.rectangle55:setHeight(500); obj.rectangle55:setColor("darkred"); obj.rectangle55:setStrokeColor("black"); obj.rectangle55:setStrokeSize(5); obj.rectangle55:setName("rectangle55"); obj.label190 = GUI.fromHandle(_obj_newObject("label")); obj.label190:setParent(obj.layout39); obj.label190:setLeft(000); obj.label190:setTop(005); obj.label190:setHeight(20); obj.label190:setWidth(405); obj.label190:setFontColor("White"); obj.label190:setFontSize(18); obj.label190:setText("Capacidades"); obj.label190:setAutoSize(true); obj.label190:setHorzTextAlign("center"); obj.label190:setName("label190"); obj.textEditor11 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor11:setParent(obj.layout39); obj.textEditor11:setLeft(07); obj.textEditor11:setTop(30); obj.textEditor11:setWidth(400); obj.textEditor11:setHeight(460); obj.textEditor11:setField("campoCapacidades2"); obj.textEditor11:setName("textEditor11"); obj.tab6 = GUI.fromHandle(_obj_newObject("tab")); obj.tab6:setParent(obj.tabControl2); obj.tab6:setTitle("Outros"); obj.tab6:setName("tab6"); obj.frmPokemon5 = GUI.fromHandle(_obj_newObject("form")); obj.frmPokemon5:setParent(obj.tab6); obj.frmPokemon5:setName("frmPokemon5"); obj.frmPokemon5:setAlign("client"); obj.frmPokemon5:setTheme("dark"); obj.frmPokemon5:setMargins({top=1}); obj.rectangle56 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle56:setParent(obj.frmPokemon5); obj.rectangle56:setAlign("top"); obj.rectangle56:setColor("black"); obj.rectangle56:setXradius(10); obj.rectangle56:setYradius(10); obj.rectangle56:setHeight(880); obj.rectangle56:setPadding({top=3, left=3, right=3, bottom=3}); obj.rectangle56:setName("rectangle56"); obj.layout40 = GUI.fromHandle(_obj_newObject("layout")); obj.layout40:setParent(obj.rectangle56); obj.layout40:setLeft(50); obj.layout40:setTop(20); obj.layout40:setHeight(600); obj.layout40:setWidth(800); obj.layout40:setName("layout40"); obj.label191 = GUI.fromHandle(_obj_newObject("label")); obj.label191:setParent(obj.layout40); obj.label191:setLeft(000); obj.label191:setTop(000); obj.label191:setHeight(20); obj.label191:setWidth(60); obj.label191:setText("Dieta:"); obj.label191:setAutoSize(true); lfm_setPropAsString(obj.label191, "fontStyle", "bold"); obj.label191:setName("label191"); obj.edit244 = GUI.fromHandle(_obj_newObject("edit")); obj.edit244:setParent(obj.layout40); obj.edit244:setLeft(85); obj.edit244:setTop(000); obj.edit244:setHeight(20); obj.edit244:setWidth(160); obj.edit244:setField("Dieta_Poke"); obj.edit244:setHorzTextAlign("center"); obj.edit244:setName("edit244"); obj.label192 = GUI.fromHandle(_obj_newObject("label")); obj.label192:setParent(obj.layout40); obj.label192:setLeft(000); obj.label192:setTop(025); obj.label192:setHeight(20); obj.label192:setWidth(60); obj.label192:setText("Likes:"); obj.label192:setAutoSize(true); lfm_setPropAsString(obj.label192, "fontStyle", "bold"); obj.label192:setName("label192"); obj.edit245 = GUI.fromHandle(_obj_newObject("edit")); obj.edit245:setParent(obj.layout40); obj.edit245:setLeft(85); obj.edit245:setTop(025); obj.edit245:setHeight(20); obj.edit245:setWidth(160); obj.edit245:setField("Sabor_Fav"); obj.edit245:setHorzTextAlign("center"); obj.edit245:setEnabled(false); obj.edit245:setName("edit245"); obj.label193 = GUI.fromHandle(_obj_newObject("label")); obj.label193:setParent(obj.layout40); obj.label193:setLeft(000); obj.label193:setTop(050); obj.label193:setHeight(20); obj.label193:setWidth(60); obj.label193:setText("Dislikes:"); obj.label193:setAutoSize(true); lfm_setPropAsString(obj.label193, "fontStyle", "bold"); obj.label193:setName("label193"); obj.edit246 = GUI.fromHandle(_obj_newObject("edit")); obj.edit246:setParent(obj.layout40); obj.edit246:setLeft(85); obj.edit246:setTop(050); obj.edit246:setHeight(20); obj.edit246:setWidth(160); obj.edit246:setField("Sabor_Desg"); obj.edit246:setHorzTextAlign("center"); obj.edit246:setEnabled(false); obj.edit246:setName("edit246"); obj.layout41 = GUI.fromHandle(_obj_newObject("layout")); obj.layout41:setParent(obj.rectangle56); obj.layout41:setLeft(50); obj.layout41:setTop(160); obj.layout41:setHeight(400); obj.layout41:setWidth(600); obj.layout41:setName("layout41"); obj.rectangle57 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle57:setParent(obj.layout41); obj.rectangle57:setLeft(000); obj.rectangle57:setTop(000); obj.rectangle57:setWidth(580); obj.rectangle57:setHeight(310); obj.rectangle57:setColor("darkred"); obj.rectangle57:setStrokeColor("black"); obj.rectangle57:setStrokeSize(5); obj.rectangle57:setName("rectangle57"); obj.label194 = GUI.fromHandle(_obj_newObject("label")); obj.label194:setParent(obj.layout41); obj.label194:setLeft(000); obj.label194:setTop(005); obj.label194:setHeight(20); obj.label194:setWidth(600); obj.label194:setFontColor("White"); obj.label194:setFontSize(18); obj.label194:setText("Anotações"); obj.label194:setAutoSize(true); obj.label194:setHorzTextAlign("center"); obj.label194:setName("label194"); obj.textEditor12 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor12:setParent(obj.layout41); obj.textEditor12:setLeft(05); obj.textEditor12:setTop(30); obj.textEditor12:setWidth(570); obj.textEditor12:setHeight(315); obj.textEditor12:setField("campoNotasPok"); obj.textEditor12:setName("textEditor12"); obj.layout42 = GUI.fromHandle(_obj_newObject("layout")); obj.layout42:setParent(obj.rectangle56); obj.layout42:setLeft(660); obj.layout42:setTop(10); obj.layout42:setHeight(320); obj.layout42:setWidth(420); obj.layout42:setName("layout42"); obj.label195 = GUI.fromHandle(_obj_newObject("label")); obj.label195:setParent(obj.layout42); obj.label195:setLeft(000); obj.label195:setTop(000); obj.label195:setHeight(20); obj.label195:setWidth(80); obj.label195:setText("Aptidão"); obj.label195:setAutoSize(true); lfm_setPropAsString(obj.label195, "fontStyle", "bold"); obj.label195:setName("label195"); obj.label196 = GUI.fromHandle(_obj_newObject("label")); obj.label196:setParent(obj.layout42); obj.label196:setLeft(85); obj.label196:setTop(000); obj.label196:setHeight(20); obj.label196:setWidth(30); obj.label196:setText("Rank"); obj.label196:setAutoSize(true); obj.label196:setName("label196"); obj.label197 = GUI.fromHandle(_obj_newObject("label")); obj.label197:setParent(obj.layout42); obj.label197:setLeft(120); obj.label197:setTop(000); obj.label197:setHeight(20); obj.label197:setWidth(30); obj.label197:setText("Total"); obj.label197:setAutoSize(true); obj.label197:setName("label197"); obj.label198 = GUI.fromHandle(_obj_newObject("label")); obj.label198:setParent(obj.layout42); obj.label198:setLeft(155); obj.label198:setTop(000); obj.label198:setHeight(20); obj.label198:setWidth(30); obj.label198:setText("Atual"); obj.label198:setAutoSize(true); obj.label198:setName("label198"); obj.label199 = GUI.fromHandle(_obj_newObject("label")); obj.label199:setParent(obj.layout42); obj.label199:setLeft(000); obj.label199:setTop(025); obj.label199:setHeight(20); obj.label199:setWidth(80); obj.label199:setText("Estilo"); obj.label199:setAutoSize(true); lfm_setPropAsString(obj.label199, "fontStyle", "bold"); obj.label199:setName("label199"); obj.edit247 = GUI.fromHandle(_obj_newObject("edit")); obj.edit247:setParent(obj.layout42); obj.edit247:setLeft(85); obj.edit247:setTop(025); obj.edit247:setHeight(20); obj.edit247:setWidth(30); obj.edit247:setField("Estilo_Rank"); obj.edit247:setHorzTextAlign("center"); obj.edit247:setType("number"); obj.edit247:setName("edit247"); obj.edit248 = GUI.fromHandle(_obj_newObject("edit")); obj.edit248:setParent(obj.layout42); obj.edit248:setLeft(120); obj.edit248:setTop(025); obj.edit248:setHeight(20); obj.edit248:setWidth(30); obj.edit248:setField("Estilo_Total"); obj.edit248:setHorzTextAlign("center"); obj.edit248:setType("number"); obj.edit248:setName("edit248"); obj.edit249 = GUI.fromHandle(_obj_newObject("edit")); obj.edit249:setParent(obj.layout42); obj.edit249:setLeft(155); obj.edit249:setTop(025); obj.edit249:setHeight(20); obj.edit249:setWidth(30); obj.edit249:setField("Estilo_Atual"); obj.edit249:setHorzTextAlign("center"); obj.edit249:setType("number"); obj.edit249:setName("edit249"); obj.label200 = GUI.fromHandle(_obj_newObject("label")); obj.label200:setParent(obj.layout42); obj.label200:setLeft(000); obj.label200:setTop(050); obj.label200:setHeight(20); obj.label200:setWidth(80); obj.label200:setText("Beleza"); obj.label200:setAutoSize(true); lfm_setPropAsString(obj.label200, "fontStyle", "bold"); obj.label200:setName("label200"); obj.edit250 = GUI.fromHandle(_obj_newObject("edit")); obj.edit250:setParent(obj.layout42); obj.edit250:setLeft(85); obj.edit250:setTop(050); obj.edit250:setHeight(20); obj.edit250:setWidth(30); obj.edit250:setField("Beleza_Rank"); obj.edit250:setHorzTextAlign("center"); obj.edit250:setType("number"); obj.edit250:setName("edit250"); obj.edit251 = GUI.fromHandle(_obj_newObject("edit")); obj.edit251:setParent(obj.layout42); obj.edit251:setLeft(120); obj.edit251:setTop(050); obj.edit251:setHeight(20); obj.edit251:setWidth(30); obj.edit251:setField("Beleza_Total"); obj.edit251:setHorzTextAlign("center"); obj.edit251:setType("number"); obj.edit251:setName("edit251"); obj.edit252 = GUI.fromHandle(_obj_newObject("edit")); obj.edit252:setParent(obj.layout42); obj.edit252:setLeft(155); obj.edit252:setTop(050); obj.edit252:setHeight(20); obj.edit252:setWidth(30); obj.edit252:setField("Beleza_Atual"); obj.edit252:setHorzTextAlign("center"); obj.edit252:setType("number"); obj.edit252:setName("edit252"); obj.label201 = GUI.fromHandle(_obj_newObject("label")); obj.label201:setParent(obj.layout42); obj.label201:setLeft(000); obj.label201:setTop(075); obj.label201:setHeight(20); obj.label201:setWidth(80); obj.label201:setText("Ternura"); obj.label201:setAutoSize(true); lfm_setPropAsString(obj.label201, "fontStyle", "bold"); obj.label201:setName("label201"); obj.edit253 = GUI.fromHandle(_obj_newObject("edit")); obj.edit253:setParent(obj.layout42); obj.edit253:setLeft(85); obj.edit253:setTop(075); obj.edit253:setHeight(20); obj.edit253:setWidth(30); obj.edit253:setField("Ternura_Rank"); obj.edit253:setHorzTextAlign("center"); obj.edit253:setType("number"); obj.edit253:setName("edit253"); obj.edit254 = GUI.fromHandle(_obj_newObject("edit")); obj.edit254:setParent(obj.layout42); obj.edit254:setLeft(120); obj.edit254:setTop(075); obj.edit254:setHeight(20); obj.edit254:setWidth(30); obj.edit254:setField("Ternura_Total"); obj.edit254:setHorzTextAlign("center"); obj.edit254:setType("number"); obj.edit254:setName("edit254"); obj.edit255 = GUI.fromHandle(_obj_newObject("edit")); obj.edit255:setParent(obj.layout42); obj.edit255:setLeft(155); obj.edit255:setTop(075); obj.edit255:setHeight(20); obj.edit255:setWidth(30); obj.edit255:setField("Ternura_Atual"); obj.edit255:setHorzTextAlign("center"); obj.edit255:setType("number"); obj.edit255:setName("edit255"); obj.label202 = GUI.fromHandle(_obj_newObject("label")); obj.label202:setParent(obj.layout42); obj.label202:setLeft(000); obj.label202:setTop(100); obj.label202:setHeight(20); obj.label202:setWidth(80); obj.label202:setText("Perspicácia"); obj.label202:setAutoSize(true); lfm_setPropAsString(obj.label202, "fontStyle", "bold"); obj.label202:setName("label202"); obj.edit256 = GUI.fromHandle(_obj_newObject("edit")); obj.edit256:setParent(obj.layout42); obj.edit256:setLeft(85); obj.edit256:setTop(100); obj.edit256:setHeight(20); obj.edit256:setWidth(30); obj.edit256:setField("Perspicácia_Rank"); obj.edit256:setHorzTextAlign("center"); obj.edit256:setType("number"); obj.edit256:setName("edit256"); obj.edit257 = GUI.fromHandle(_obj_newObject("edit")); obj.edit257:setParent(obj.layout42); obj.edit257:setLeft(120); obj.edit257:setTop(100); obj.edit257:setHeight(20); obj.edit257:setWidth(30); obj.edit257:setField("Perspicácia_Total"); obj.edit257:setHorzTextAlign("center"); obj.edit257:setType("number"); obj.edit257:setName("edit257"); obj.edit258 = GUI.fromHandle(_obj_newObject("edit")); obj.edit258:setParent(obj.layout42); obj.edit258:setLeft(155); obj.edit258:setTop(100); obj.edit258:setHeight(20); obj.edit258:setWidth(30); obj.edit258:setField("Perspicácia_Atual"); obj.edit258:setHorzTextAlign("center"); obj.edit258:setType("number"); obj.edit258:setName("edit258"); obj.label203 = GUI.fromHandle(_obj_newObject("label")); obj.label203:setParent(obj.layout42); obj.label203:setLeft(000); obj.label203:setTop(125); obj.label203:setHeight(20); obj.label203:setWidth(80); obj.label203:setText("Vigor"); obj.label203:setAutoSize(true); lfm_setPropAsString(obj.label203, "fontStyle", "bold"); obj.label203:setName("label203"); obj.edit259 = GUI.fromHandle(_obj_newObject("edit")); obj.edit259:setParent(obj.layout42); obj.edit259:setLeft(85); obj.edit259:setTop(125); obj.edit259:setHeight(20); obj.edit259:setWidth(30); obj.edit259:setField("Vigor_Rank"); obj.edit259:setHorzTextAlign("center"); obj.edit259:setType("number"); obj.edit259:setName("edit259"); obj.edit260 = GUI.fromHandle(_obj_newObject("edit")); obj.edit260:setParent(obj.layout42); obj.edit260:setLeft(120); obj.edit260:setTop(125); obj.edit260:setHeight(20); obj.edit260:setWidth(30); obj.edit260:setField("Vigor_Total"); obj.edit260:setHorzTextAlign("center"); obj.edit260:setType("number"); obj.edit260:setName("edit260"); obj.edit261 = GUI.fromHandle(_obj_newObject("edit")); obj.edit261:setParent(obj.layout42); obj.edit261:setLeft(155); obj.edit261:setTop(125); obj.edit261:setHeight(20); obj.edit261:setWidth(30); obj.edit261:setField("Vigor_Atual"); obj.edit261:setHorzTextAlign("center"); obj.edit261:setType("number"); obj.edit261:setName("edit261"); obj.layout43 = GUI.fromHandle(_obj_newObject("layout")); obj.layout43:setParent(obj.rectangle56); obj.layout43:setLeft(640); obj.layout43:setTop(175); obj.layout43:setHeight(350); obj.layout43:setWidth(250); obj.layout43:setName("layout43"); obj.label204 = GUI.fromHandle(_obj_newObject("label")); obj.label204:setParent(obj.layout43); obj.label204:setLeft(000); obj.label204:setTop(0); obj.label204:setHeight(20); obj.label204:setWidth(200); obj.label204:setText("Conquistas em Contests"); obj.label204:setAutoSize(true); obj.label204:setHorzTextAlign("center"); obj.label204:setName("label204"); obj.textEditor13 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor13:setParent(obj.layout43); obj.textEditor13:setLeft(0); obj.textEditor13:setTop(25); obj.textEditor13:setHeight(305); obj.textEditor13:setWidth(225); obj.textEditor13:setField("CampoContestsP2"); obj.textEditor13:setName("textEditor13"); obj.tab7 = GUI.fromHandle(_obj_newObject("tab")); obj.tab7:setParent(obj.tabControl1); obj.tab7:setTitle("Talentos"); obj.tab7:setName("tab7"); obj.frmFichaRPGmeister4_svg = GUI.fromHandle(_obj_newObject("form")); obj.frmFichaRPGmeister4_svg:setParent(obj.tab7); obj.frmFichaRPGmeister4_svg:setName("frmFichaRPGmeister4_svg"); obj.frmFichaRPGmeister4_svg:setAlign("client"); obj.frmFichaRPGmeister4_svg:setTheme("dark"); obj.frmFichaRPGmeister4_svg:setMargins({top=1}); obj.popHabilidade = GUI.fromHandle(_obj_newObject("popup")); obj.popHabilidade:setParent(obj.frmFichaRPGmeister4_svg); obj.popHabilidade:setName("popHabilidade"); obj.popHabilidade:setWidth(300); obj.popHabilidade:setHeight(280); obj.popHabilidade:setBackOpacity(0.4); lfm_setPropAsString(obj.popHabilidade, "autoScopeNode", "false"); obj.flowLayout1 = GUI.fromHandle(_obj_newObject("flowLayout")); obj.flowLayout1:setParent(obj.popHabilidade); obj.flowLayout1:setAlign("top"); obj.flowLayout1:setAutoHeight(true); obj.flowLayout1:setMaxControlsPerLine(3); obj.flowLayout1:setMargins({bottom=4}); obj.flowLayout1:setHorzAlign("center"); obj.flowLayout1:setName("flowLayout1"); obj.flowPart1 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart1:setParent(obj.flowLayout1); obj.flowPart1:setMinWidth(90); obj.flowPart1:setMaxWidth(100); obj.flowPart1:setHeight(35); obj.flowPart1:setName("flowPart1"); obj.label205 = GUI.fromHandle(_obj_newObject("label")); obj.label205:setParent(obj.flowPart1); obj.label205:setAlign("top"); obj.label205:setFontSize(10); obj.label205:setText("Nível"); obj.label205:setHorzTextAlign("center"); obj.label205:setWordWrap(true); obj.label205:setTextTrimming("none"); obj.label205:setAutoSize(true); obj.label205:setName("label205"); obj.edit262 = GUI.fromHandle(_obj_newObject("edit")); obj.edit262:setParent(obj.flowPart1); obj.edit262:setAlign("client"); obj.edit262:setField("nivelHabilidade"); obj.edit262:setHorzTextAlign("center"); obj.edit262:setFontSize(12); obj.edit262:setType("number"); obj.edit262:setName("edit262"); obj.flowPart2 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart2:setParent(obj.flowLayout1); obj.flowPart2:setMinWidth(180); obj.flowPart2:setMaxWidth(200); obj.flowPart2:setHeight(35); obj.flowPart2:setName("flowPart2"); obj.label206 = GUI.fromHandle(_obj_newObject("label")); obj.label206:setParent(obj.flowPart2); obj.label206:setAlign("top"); obj.label206:setFontSize(10); obj.label206:setText("Nome"); obj.label206:setHorzTextAlign("center"); obj.label206:setWordWrap(true); obj.label206:setTextTrimming("none"); obj.label206:setAutoSize(true); obj.label206:setName("label206"); obj.edit263 = GUI.fromHandle(_obj_newObject("edit")); obj.edit263:setParent(obj.flowPart2); obj.edit263:setAlign("client"); obj.edit263:setField("nomeHabilidade"); obj.edit263:setFontSize(12); obj.edit263:setName("edit263"); obj.flowPart3 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart3:setParent(obj.flowLayout1); obj.flowPart3:setMinWidth(90); obj.flowPart3:setMaxWidth(100); obj.flowPart3:setHeight(35); obj.flowPart3:setName("flowPart3"); obj.label207 = GUI.fromHandle(_obj_newObject("label")); obj.label207:setParent(obj.flowPart3); obj.label207:setAlign("top"); obj.label207:setFontSize(10); obj.label207:setText("Freq."); obj.label207:setHorzTextAlign("center"); obj.label207:setWordWrap(true); obj.label207:setTextTrimming("none"); obj.label207:setAutoSize(true); obj.label207:setName("label207"); obj.edit264 = GUI.fromHandle(_obj_newObject("edit")); obj.edit264:setParent(obj.flowPart3); obj.edit264:setAlign("client"); obj.edit264:setField("freqHabilidade"); obj.edit264:setHorzTextAlign("center"); obj.edit264:setFontSize(12); obj.edit264:setName("edit264"); obj.flowPart4 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart4:setParent(obj.flowLayout1); obj.flowPart4:setMinWidth(180); obj.flowPart4:setMaxWidth(200); obj.flowPart4:setHeight(35); obj.flowPart4:setName("flowPart4"); obj.label208 = GUI.fromHandle(_obj_newObject("label")); obj.label208:setParent(obj.flowPart4); obj.label208:setAlign("top"); obj.label208:setFontSize(10); obj.label208:setText("Gatilho/Alvo"); obj.label208:setHorzTextAlign("center"); obj.label208:setWordWrap(true); obj.label208:setTextTrimming("none"); obj.label208:setAutoSize(true); obj.label208:setName("label208"); obj.edit265 = GUI.fromHandle(_obj_newObject("edit")); obj.edit265:setParent(obj.flowPart4); obj.edit265:setAlign("client"); obj.edit265:setField("gatHabilidade"); obj.edit265:setFontSize(12); obj.edit265:setName("edit265"); obj.flowPart5 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart5:setParent(obj.flowLayout1); obj.flowPart5:setMinWidth(90); obj.flowPart5:setMaxWidth(100); obj.flowPart5:setHeight(35); obj.flowPart5:setName("flowPart5"); obj.label209 = GUI.fromHandle(_obj_newObject("label")); obj.label209:setParent(obj.flowPart5); obj.label209:setAlign("top"); obj.label209:setFontSize(10); obj.label209:setText("Íncones"); obj.label209:setHorzTextAlign("center"); obj.label209:setWordWrap(true); obj.label209:setTextTrimming("none"); obj.label209:setAutoSize(true); obj.label209:setName("label209"); obj.edit266 = GUI.fromHandle(_obj_newObject("edit")); obj.edit266:setParent(obj.flowPart5); obj.edit266:setAlign("client"); obj.edit266:setField("incHabilidade"); obj.edit266:setHorzTextAlign("center"); obj.edit266:setFontSize(12); obj.edit266:setName("edit266"); obj.flowPart6 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart6:setParent(obj.flowLayout1); obj.flowPart6:setMinWidth(180); obj.flowPart6:setMaxWidth(200); obj.flowPart6:setHeight(35); obj.flowPart6:setName("flowPart6"); obj.label210 = GUI.fromHandle(_obj_newObject("label")); obj.label210:setParent(obj.flowPart6); obj.label210:setAlign("top"); obj.label210:setFontSize(10); obj.label210:setText("Requisitos"); obj.label210:setHorzTextAlign("center"); obj.label210:setWordWrap(true); obj.label210:setTextTrimming("none"); obj.label210:setAutoSize(true); obj.label210:setName("label210"); obj.edit267 = GUI.fromHandle(_obj_newObject("edit")); obj.edit267:setParent(obj.flowPart6); obj.edit267:setAlign("client"); obj.edit267:setField("reqHabilidade"); obj.edit267:setFontSize(12); obj.edit267:setName("edit267"); obj.dataLink89 = GUI.fromHandle(_obj_newObject("dataLink")); obj.dataLink89:setParent(obj.flowLayout1); obj.dataLink89:setField("nivelHabilidade"); obj.dataLink89:setName("dataLink89"); obj.textEditor14 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor14:setParent(obj.popHabilidade); obj.textEditor14:setAlign("client"); obj.textEditor14:setField("descricao"); obj.textEditor14:setName("textEditor14"); obj.layout44 = GUI.fromHandle(_obj_newObject("layout")); obj.layout44:setParent(obj.frmFichaRPGmeister4_svg); obj.layout44:setLeft(000); obj.layout44:setTop(000); obj.layout44:setHeight(600); obj.layout44:setWidth(1095); obj.layout44:setName("layout44"); obj.image53 = GUI.fromHandle(_obj_newObject("image")); obj.image53:setParent(obj.layout44); obj.image53:setLeft(000); obj.image53:setTop(000); obj.image53:setHeight(650); obj.image53:setWidth(1100); obj.image53:setSRC("/img/Pokeball.jpg"); obj.image53:setStyle("autoFit"); obj.image53:setName("image53"); obj.layout45 = GUI.fromHandle(_obj_newObject("layout")); obj.layout45:setParent(obj.frmFichaRPGmeister4_svg); obj.layout45:setLeft(50); obj.layout45:setTop(25); obj.layout45:setWidth(400); obj.layout45:setHeight(520); obj.layout45:setName("layout45"); obj.rectangle58 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle58:setParent(obj.layout45); obj.rectangle58:setAlign("client"); obj.rectangle58:setColor("#0000007F"); obj.rectangle58:setName("rectangle58"); obj.label211 = GUI.fromHandle(_obj_newObject("label")); obj.label211:setParent(obj.layout45); obj.label211:setLeft(0); obj.label211:setTop(0); obj.label211:setWidth(400); obj.label211:setHeight(20); obj.label211:setText("Habilidades"); obj.label211:setAutoSize(true); obj.label211:setFontColor("White"); obj.label211:setFontSize(18); obj.label211:setHorzTextAlign("center"); obj.label211:setName("label211"); obj.button35 = GUI.fromHandle(_obj_newObject("button")); obj.button35:setParent(obj.layout45); obj.button35:setText("Nova Habilidade"); obj.button35:setLeft(0); obj.button35:setTop(25); obj.button35:setWidth(390); obj.button35:setHeight(20); obj.button35:setName("button35"); obj.rclListaDosTalentosBase = GUI.fromHandle(_obj_newObject("recordList")); obj.rclListaDosTalentosBase:setParent(obj.layout45); obj.rclListaDosTalentosBase:setName("rclListaDosTalentosBase"); obj.rclListaDosTalentosBase:setField("campoDosTalB"); obj.rclListaDosTalentosBase:setTemplateForm("frmFichaRPGmeister4h_svg"); obj.rclListaDosTalentosBase:setLeft(5); obj.rclListaDosTalentosBase:setTop(50); obj.rclListaDosTalentosBase:setWidth(390); obj.rclListaDosTalentosBase:setHeight(460); obj.rclListaDosTalentosBase:setLayout("vertical"); obj.layout46 = GUI.fromHandle(_obj_newObject("layout")); obj.layout46:setParent(obj.frmFichaRPGmeister4_svg); obj.layout46:setLeft(590); obj.layout46:setTop(25); obj.layout46:setWidth(400); obj.layout46:setHeight(520); obj.layout46:setName("layout46"); obj.rectangle59 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle59:setParent(obj.layout46); obj.rectangle59:setAlign("client"); obj.rectangle59:setColor("#0000007F"); obj.rectangle59:setName("rectangle59"); obj.label212 = GUI.fromHandle(_obj_newObject("label")); obj.label212:setParent(obj.layout46); obj.label212:setLeft(0); obj.label212:setTop(0); obj.label212:setWidth(400); obj.label212:setHeight(20); obj.label212:setText("Talentos"); obj.label212:setAutoSize(true); obj.label212:setFontColor("White"); obj.label212:setFontSize(18); obj.label212:setHorzTextAlign("center"); obj.label212:setName("label212"); obj.button36 = GUI.fromHandle(_obj_newObject("button")); obj.button36:setParent(obj.layout46); obj.button36:setText("Novo Talento"); obj.button36:setLeft(0); obj.button36:setTop(25); obj.button36:setWidth(390); obj.button36:setHeight(20); obj.button36:setName("button36"); obj.rclListaDosTalentosAvanc = GUI.fromHandle(_obj_newObject("recordList")); obj.rclListaDosTalentosAvanc:setParent(obj.layout46); obj.rclListaDosTalentosAvanc:setName("rclListaDosTalentosAvanc"); obj.rclListaDosTalentosAvanc:setField("campoDosTalA"); obj.rclListaDosTalentosAvanc:setTemplateForm("frmFichaRPGmeister4h_svg"); obj.rclListaDosTalentosAvanc:setLeft(5); obj.rclListaDosTalentosAvanc:setTop(50); obj.rclListaDosTalentosAvanc:setWidth(390); obj.rclListaDosTalentosAvanc:setHeight(460); obj.rclListaDosTalentosAvanc:setLayout("vertical"); obj.tab8 = GUI.fromHandle(_obj_newObject("tab")); obj.tab8:setParent(obj.tabControl1); obj.tab8:setTitle("Golpes"); obj.tab8:setName("tab8"); obj.frmFichaRPGmeister2_svg = GUI.fromHandle(_obj_newObject("form")); obj.frmFichaRPGmeister2_svg:setParent(obj.tab8); obj.frmFichaRPGmeister2_svg:setName("frmFichaRPGmeister2_svg"); obj.frmFichaRPGmeister2_svg:setAlign("client"); obj.frmFichaRPGmeister2_svg:setTheme("dark"); obj.frmFichaRPGmeister2_svg:setMargins({top=1}); obj.scrollBox4 = GUI.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox4:setParent(obj.frmFichaRPGmeister2_svg); obj.scrollBox4:setAlign("client"); obj.scrollBox4:setName("scrollBox4"); obj.layout47 = GUI.fromHandle(_obj_newObject("layout")); obj.layout47:setParent(obj.scrollBox4); obj.layout47:setLeft(0); obj.layout47:setTop(0); obj.layout47:setWidth(1080); obj.layout47:setHeight(760); obj.layout47:setName("layout47"); obj.rectangle60 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle60:setParent(obj.layout47); obj.rectangle60:setAlign("client"); obj.rectangle60:setColor("#0000007F"); obj.rectangle60:setName("rectangle60"); obj.layout48 = GUI.fromHandle(_obj_newObject("layout")); obj.layout48:setParent(obj.layout47); obj.layout48:setLeft(2); obj.layout48:setTop(2); obj.layout48:setWidth(1207); obj.layout48:setHeight(92); obj.layout48:setName("layout48"); obj.rectangle61 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle61:setParent(obj.layout48); obj.rectangle61:setAlign("client"); obj.rectangle61:setColor("black"); obj.rectangle61:setName("rectangle61"); obj.label213 = GUI.fromHandle(_obj_newObject("label")); obj.label213:setParent(obj.layout48); obj.label213:setLeft(5); obj.label213:setTop(5); obj.label213:setWidth(70); obj.label213:setHeight(25); obj.label213:setText("Golpe"); lfm_setPropAsString(obj.label213, "fontStyle", "bold"); obj.label213:setName("label213"); obj.edit268 = GUI.fromHandle(_obj_newObject("edit")); obj.edit268:setParent(obj.layout48); obj.edit268:setVertTextAlign("center"); obj.edit268:setLeft(75); obj.edit268:setTop(5); obj.edit268:setWidth(160); obj.edit268:setHeight(25); obj.edit268:setField("golpe1"); obj.edit268:setName("edit268"); obj.label214 = GUI.fromHandle(_obj_newObject("label")); obj.label214:setParent(obj.layout48); obj.label214:setLeft(5); obj.label214:setTop(30); obj.label214:setWidth(80); obj.label214:setHeight(25); obj.label214:setText("Descritores"); lfm_setPropAsString(obj.label214, "fontStyle", "bold"); obj.label214:setName("label214"); obj.edit269 = GUI.fromHandle(_obj_newObject("edit")); obj.edit269:setParent(obj.layout48); obj.edit269:setVertTextAlign("center"); obj.edit269:setLeft(75); obj.edit269:setTop(30); obj.edit269:setWidth(160); obj.edit269:setHeight(25); obj.edit269:setField("Descritores1"); obj.edit269:setName("edit269"); obj.label215 = GUI.fromHandle(_obj_newObject("label")); obj.label215:setParent(obj.layout48); obj.label215:setLeft(5); obj.label215:setTop(55); obj.label215:setWidth(70); obj.label215:setHeight(25); obj.label215:setText("Alcance"); lfm_setPropAsString(obj.label215, "fontStyle", "bold"); obj.label215:setName("label215"); obj.edit270 = GUI.fromHandle(_obj_newObject("edit")); obj.edit270:setParent(obj.layout48); obj.edit270:setVertTextAlign("center"); obj.edit270:setLeft(75); obj.edit270:setTop(55); obj.edit270:setWidth(160); obj.edit270:setHeight(25); obj.edit270:setField("alcance1"); obj.edit270:setName("edit270"); obj.label216 = GUI.fromHandle(_obj_newObject("label")); obj.label216:setParent(obj.layout48); obj.label216:setLeft(240); obj.label216:setTop(6); obj.label216:setWidth(50); obj.label216:setHeight(25); obj.label216:setText("Tipo"); lfm_setPropAsString(obj.label216, "fontStyle", "bold"); obj.label216:setName("label216"); obj.edit271 = GUI.fromHandle(_obj_newObject("edit")); obj.edit271:setParent(obj.layout48); obj.edit271:setVertTextAlign("center"); obj.edit271:setLeft(282); obj.edit271:setTop(6); obj.edit271:setWidth(82); obj.edit271:setHeight(25); obj.edit271:setField("tipo1"); obj.edit271:setName("edit271"); obj.label217 = GUI.fromHandle(_obj_newObject("label")); obj.label217:setParent(obj.layout48); obj.label217:setLeft(240); obj.label217:setTop(31); obj.label217:setWidth(50); obj.label217:setHeight(25); obj.label217:setText("Classe"); lfm_setPropAsString(obj.label217, "fontStyle", "bold"); obj.label217:setName("label217"); obj.comboBox21 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox21:setParent(obj.layout48); obj.comboBox21:setLeft(282); obj.comboBox21:setTop(31); obj.comboBox21:setWidth(82); obj.comboBox21:setHeight(25); obj.comboBox21:setField("classe1"); obj.comboBox21:setHorzTextAlign("center"); obj.comboBox21:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox21:setValues({'1', '2', '3'}); obj.comboBox21:setName("comboBox21"); obj.label218 = GUI.fromHandle(_obj_newObject("label")); obj.label218:setParent(obj.layout48); obj.label218:setLeft(240); obj.label218:setTop(55); obj.label218:setWidth(50); obj.label218:setHeight(25); obj.label218:setText("Freq."); lfm_setPropAsString(obj.label218, "fontStyle", "bold"); obj.label218:setName("label218"); obj.edit272 = GUI.fromHandle(_obj_newObject("edit")); obj.edit272:setParent(obj.layout48); obj.edit272:setVertTextAlign("center"); obj.edit272:setLeft(282); obj.edit272:setTop(55); obj.edit272:setWidth(82); obj.edit272:setHeight(25); obj.edit272:setField("frequencia1"); obj.edit272:setName("edit272"); obj.label219 = GUI.fromHandle(_obj_newObject("label")); obj.label219:setParent(obj.layout48); obj.label219:setLeft(370); obj.label219:setTop(6); obj.label219:setWidth(70); obj.label219:setHeight(25); obj.label219:setText("Acurácia"); lfm_setPropAsString(obj.label219, "fontStyle", "bold"); obj.label219:setName("label219"); obj.edit273 = GUI.fromHandle(_obj_newObject("edit")); obj.edit273:setParent(obj.layout48); obj.edit273:setVertTextAlign("center"); obj.edit273:setLeft(425); obj.edit273:setTop(6); obj.edit273:setWidth(53); obj.edit273:setHeight(25); obj.edit273:setField("Acc1"); obj.edit273:setType("number"); obj.edit273:setName("edit273"); obj.label220 = GUI.fromHandle(_obj_newObject("label")); obj.label220:setParent(obj.layout48); obj.label220:setLeft(370); obj.label220:setTop(31); obj.label220:setWidth(70); obj.label220:setHeight(25); obj.label220:setText("Prec.Bôn."); lfm_setPropAsString(obj.label220, "fontStyle", "bold"); obj.label220:setName("label220"); obj.edit274 = GUI.fromHandle(_obj_newObject("edit")); obj.edit274:setParent(obj.layout48); obj.edit274:setVertTextAlign("center"); obj.edit274:setLeft(425); obj.edit274:setTop(31); obj.edit274:setWidth(53); obj.edit274:setHeight(25); obj.edit274:setField("ataque1"); obj.edit274:setType("number"); obj.edit274:setName("edit274"); obj.label221 = GUI.fromHandle(_obj_newObject("label")); obj.label221:setParent(obj.layout48); obj.label221:setLeft(370); obj.label221:setTop(55); obj.label221:setWidth(70); obj.label221:setHeight(25); obj.label221:setText("D. Base"); lfm_setPropAsString(obj.label221, "fontStyle", "bold"); obj.label221:setName("label221"); obj.edit275 = GUI.fromHandle(_obj_newObject("edit")); obj.edit275:setParent(obj.layout48); obj.edit275:setVertTextAlign("center"); obj.edit275:setLeft(425); obj.edit275:setTop(55); obj.edit275:setWidth(53); obj.edit275:setHeight(25); obj.edit275:setField("dano1"); obj.edit275:setName("edit275"); obj.button37 = GUI.fromHandle(_obj_newObject("button")); obj.button37:setParent(obj.layout48); obj.button37:setLeft(488); obj.button37:setTop(6); obj.button37:setWidth(82); obj.button37:setText("Acerto"); obj.button37:setFontSize(11); lfm_setPropAsString(obj.button37, "fontStyle", "bold"); obj.button37:setName("button37"); obj.button38 = GUI.fromHandle(_obj_newObject("button")); obj.button38:setParent(obj.layout48); obj.button38:setLeft(488); obj.button38:setTop(31); obj.button38:setWidth(82); obj.button38:setText("Dano"); obj.button38:setFontSize(11); lfm_setPropAsString(obj.button38, "fontStyle", "bold"); obj.button38:setName("button38"); obj.button39 = GUI.fromHandle(_obj_newObject("button")); obj.button39:setParent(obj.layout48); obj.button39:setLeft(488); obj.button39:setTop(55); obj.button39:setWidth(82); obj.button39:setText("Crítico"); obj.button39:setFontSize(11); lfm_setPropAsString(obj.button39, "fontStyle", "bold"); obj.button39:setName("button39"); obj.textEditor15 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor15:setParent(obj.layout48); obj.textEditor15:setLeft(575); obj.textEditor15:setTop(5); obj.textEditor15:setWidth(295); obj.textEditor15:setHeight(75); obj.textEditor15:setField("campoEfeitoGolpes1"); obj.textEditor15:setName("textEditor15"); obj.label222 = GUI.fromHandle(_obj_newObject("label")); obj.label222:setParent(obj.layout48); obj.label222:setLeft(875); obj.label222:setTop(5); obj.label222:setWidth(80); obj.label222:setHeight(25); obj.label222:setText("Aptidão"); lfm_setPropAsString(obj.label222, "fontStyle", "bold"); obj.label222:setName("label222"); obj.edit276 = GUI.fromHandle(_obj_newObject("edit")); obj.edit276:setParent(obj.layout48); obj.edit276:setVertTextAlign("center"); obj.edit276:setLeft(940); obj.edit276:setTop(5); obj.edit276:setWidth(120); obj.edit276:setHeight(25); obj.edit276:setField("tipoContest1"); obj.edit276:setName("edit276"); obj.label223 = GUI.fromHandle(_obj_newObject("label")); obj.label223:setParent(obj.layout48); obj.label223:setLeft(875); obj.label223:setTop(30); obj.label223:setWidth(80); obj.label223:setHeight(25); obj.label223:setText("Concursos"); lfm_setPropAsString(obj.label223, "fontStyle", "bold"); obj.label223:setName("label223"); obj.edit277 = GUI.fromHandle(_obj_newObject("edit")); obj.edit277:setParent(obj.layout48); obj.edit277:setVertTextAlign("center"); obj.edit277:setLeft(940); obj.edit277:setTop(30); obj.edit277:setWidth(120); obj.edit277:setHeight(25); obj.edit277:setField("efeitoContest1"); obj.edit277:setName("edit277"); obj.label224 = GUI.fromHandle(_obj_newObject("label")); obj.label224:setParent(obj.layout48); obj.label224:setLeft(875); obj.label224:setTop(55); obj.label224:setWidth(80); obj.label224:setHeight(25); obj.label224:setText("Bôn.Dano"); lfm_setPropAsString(obj.label224, "fontStyle", "bold"); obj.label224:setName("label224"); obj.edit278 = GUI.fromHandle(_obj_newObject("edit")); obj.edit278:setParent(obj.layout48); obj.edit278:setVertTextAlign("center"); obj.edit278:setLeft(940); obj.edit278:setTop(55); obj.edit278:setWidth(120); obj.edit278:setHeight(25); obj.edit278:setField("BDano1"); obj.edit278:setName("edit278"); obj.layout49 = GUI.fromHandle(_obj_newObject("layout")); obj.layout49:setParent(obj.layout47); obj.layout49:setLeft(2); obj.layout49:setTop(97); obj.layout49:setWidth(1207); obj.layout49:setHeight(92); obj.layout49:setName("layout49"); obj.rectangle62 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle62:setParent(obj.layout49); obj.rectangle62:setAlign("client"); obj.rectangle62:setColor("black"); obj.rectangle62:setName("rectangle62"); obj.label225 = GUI.fromHandle(_obj_newObject("label")); obj.label225:setParent(obj.layout49); obj.label225:setLeft(5); obj.label225:setTop(5); obj.label225:setWidth(70); obj.label225:setHeight(25); obj.label225:setText("Golpe"); lfm_setPropAsString(obj.label225, "fontStyle", "bold"); obj.label225:setName("label225"); obj.edit279 = GUI.fromHandle(_obj_newObject("edit")); obj.edit279:setParent(obj.layout49); obj.edit279:setVertTextAlign("center"); obj.edit279:setLeft(75); obj.edit279:setTop(5); obj.edit279:setWidth(160); obj.edit279:setHeight(25); obj.edit279:setField("golpe2"); obj.edit279:setName("edit279"); obj.label226 = GUI.fromHandle(_obj_newObject("label")); obj.label226:setParent(obj.layout49); obj.label226:setLeft(5); obj.label226:setTop(30); obj.label226:setWidth(80); obj.label226:setHeight(25); obj.label226:setText("Descritores"); lfm_setPropAsString(obj.label226, "fontStyle", "bold"); obj.label226:setName("label226"); obj.edit280 = GUI.fromHandle(_obj_newObject("edit")); obj.edit280:setParent(obj.layout49); obj.edit280:setVertTextAlign("center"); obj.edit280:setLeft(75); obj.edit280:setTop(30); obj.edit280:setWidth(160); obj.edit280:setHeight(25); obj.edit280:setField("Descritores2"); obj.edit280:setName("edit280"); obj.label227 = GUI.fromHandle(_obj_newObject("label")); obj.label227:setParent(obj.layout49); obj.label227:setLeft(5); obj.label227:setTop(55); obj.label227:setWidth(70); obj.label227:setHeight(25); obj.label227:setText("Alcance"); lfm_setPropAsString(obj.label227, "fontStyle", "bold"); obj.label227:setName("label227"); obj.edit281 = GUI.fromHandle(_obj_newObject("edit")); obj.edit281:setParent(obj.layout49); obj.edit281:setVertTextAlign("center"); obj.edit281:setLeft(75); obj.edit281:setTop(55); obj.edit281:setWidth(160); obj.edit281:setHeight(25); obj.edit281:setField("alcance2"); obj.edit281:setName("edit281"); obj.label228 = GUI.fromHandle(_obj_newObject("label")); obj.label228:setParent(obj.layout49); obj.label228:setLeft(240); obj.label228:setTop(6); obj.label228:setWidth(50); obj.label228:setHeight(25); obj.label228:setText("Tipo"); lfm_setPropAsString(obj.label228, "fontStyle", "bold"); obj.label228:setName("label228"); obj.edit282 = GUI.fromHandle(_obj_newObject("edit")); obj.edit282:setParent(obj.layout49); obj.edit282:setVertTextAlign("center"); obj.edit282:setLeft(282); obj.edit282:setTop(6); obj.edit282:setWidth(82); obj.edit282:setHeight(25); obj.edit282:setField("tipo2"); obj.edit282:setName("edit282"); obj.label229 = GUI.fromHandle(_obj_newObject("label")); obj.label229:setParent(obj.layout49); obj.label229:setLeft(240); obj.label229:setTop(31); obj.label229:setWidth(50); obj.label229:setHeight(25); obj.label229:setText("Classe"); lfm_setPropAsString(obj.label229, "fontStyle", "bold"); obj.label229:setName("label229"); obj.comboBox22 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox22:setParent(obj.layout49); obj.comboBox22:setLeft(282); obj.comboBox22:setTop(31); obj.comboBox22:setWidth(82); obj.comboBox22:setHeight(25); obj.comboBox22:setField("classe2"); obj.comboBox22:setHorzTextAlign("center"); obj.comboBox22:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox22:setValues({'1', '2', '3'}); obj.comboBox22:setName("comboBox22"); obj.label230 = GUI.fromHandle(_obj_newObject("label")); obj.label230:setParent(obj.layout49); obj.label230:setLeft(240); obj.label230:setTop(55); obj.label230:setWidth(50); obj.label230:setHeight(25); obj.label230:setText("Freq."); lfm_setPropAsString(obj.label230, "fontStyle", "bold"); obj.label230:setName("label230"); obj.edit283 = GUI.fromHandle(_obj_newObject("edit")); obj.edit283:setParent(obj.layout49); obj.edit283:setVertTextAlign("center"); obj.edit283:setLeft(282); obj.edit283:setTop(55); obj.edit283:setWidth(82); obj.edit283:setHeight(25); obj.edit283:setField("frequencia2"); obj.edit283:setName("edit283"); obj.label231 = GUI.fromHandle(_obj_newObject("label")); obj.label231:setParent(obj.layout49); obj.label231:setLeft(370); obj.label231:setTop(6); obj.label231:setWidth(70); obj.label231:setHeight(25); obj.label231:setText("Acurácia"); lfm_setPropAsString(obj.label231, "fontStyle", "bold"); obj.label231:setName("label231"); obj.edit284 = GUI.fromHandle(_obj_newObject("edit")); obj.edit284:setParent(obj.layout49); obj.edit284:setVertTextAlign("center"); obj.edit284:setLeft(425); obj.edit284:setTop(6); obj.edit284:setWidth(53); obj.edit284:setHeight(25); obj.edit284:setField("Acc2"); obj.edit284:setType("number"); obj.edit284:setName("edit284"); obj.label232 = GUI.fromHandle(_obj_newObject("label")); obj.label232:setParent(obj.layout49); obj.label232:setLeft(370); obj.label232:setTop(31); obj.label232:setWidth(70); obj.label232:setHeight(25); obj.label232:setText("Prec.Bôn."); lfm_setPropAsString(obj.label232, "fontStyle", "bold"); obj.label232:setName("label232"); obj.edit285 = GUI.fromHandle(_obj_newObject("edit")); obj.edit285:setParent(obj.layout49); obj.edit285:setVertTextAlign("center"); obj.edit285:setLeft(425); obj.edit285:setTop(31); obj.edit285:setWidth(53); obj.edit285:setHeight(25); obj.edit285:setField("ataque2"); obj.edit285:setType("number"); obj.edit285:setName("edit285"); obj.label233 = GUI.fromHandle(_obj_newObject("label")); obj.label233:setParent(obj.layout49); obj.label233:setLeft(370); obj.label233:setTop(55); obj.label233:setWidth(70); obj.label233:setHeight(25); obj.label233:setText("D. Base"); lfm_setPropAsString(obj.label233, "fontStyle", "bold"); obj.label233:setName("label233"); obj.edit286 = GUI.fromHandle(_obj_newObject("edit")); obj.edit286:setParent(obj.layout49); obj.edit286:setVertTextAlign("center"); obj.edit286:setLeft(425); obj.edit286:setTop(55); obj.edit286:setWidth(53); obj.edit286:setHeight(25); obj.edit286:setField("dano2"); obj.edit286:setName("edit286"); obj.button40 = GUI.fromHandle(_obj_newObject("button")); obj.button40:setParent(obj.layout49); obj.button40:setLeft(488); obj.button40:setTop(6); obj.button40:setWidth(82); obj.button40:setText("Acerto"); obj.button40:setFontSize(11); lfm_setPropAsString(obj.button40, "fontStyle", "bold"); obj.button40:setName("button40"); obj.button41 = GUI.fromHandle(_obj_newObject("button")); obj.button41:setParent(obj.layout49); obj.button41:setLeft(488); obj.button41:setTop(31); obj.button41:setWidth(82); obj.button41:setText("Dano"); obj.button41:setFontSize(11); lfm_setPropAsString(obj.button41, "fontStyle", "bold"); obj.button41:setName("button41"); obj.button42 = GUI.fromHandle(_obj_newObject("button")); obj.button42:setParent(obj.layout49); obj.button42:setLeft(488); obj.button42:setTop(55); obj.button42:setWidth(82); obj.button42:setText("Crítico"); obj.button42:setFontSize(11); lfm_setPropAsString(obj.button42, "fontStyle", "bold"); obj.button42:setName("button42"); obj.textEditor16 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor16:setParent(obj.layout49); obj.textEditor16:setLeft(575); obj.textEditor16:setTop(5); obj.textEditor16:setWidth(295); obj.textEditor16:setHeight(75); obj.textEditor16:setField("campoEfeitoGolpes2"); obj.textEditor16:setName("textEditor16"); obj.label234 = GUI.fromHandle(_obj_newObject("label")); obj.label234:setParent(obj.layout49); obj.label234:setLeft(875); obj.label234:setTop(5); obj.label234:setWidth(80); obj.label234:setHeight(25); obj.label234:setText("Aptidão"); lfm_setPropAsString(obj.label234, "fontStyle", "bold"); obj.label234:setName("label234"); obj.edit287 = GUI.fromHandle(_obj_newObject("edit")); obj.edit287:setParent(obj.layout49); obj.edit287:setVertTextAlign("center"); obj.edit287:setLeft(940); obj.edit287:setTop(5); obj.edit287:setWidth(120); obj.edit287:setHeight(25); obj.edit287:setField("tipoContest2"); obj.edit287:setName("edit287"); obj.label235 = GUI.fromHandle(_obj_newObject("label")); obj.label235:setParent(obj.layout49); obj.label235:setLeft(875); obj.label235:setTop(30); obj.label235:setWidth(80); obj.label235:setHeight(25); obj.label235:setText("Concursos"); lfm_setPropAsString(obj.label235, "fontStyle", "bold"); obj.label235:setName("label235"); obj.edit288 = GUI.fromHandle(_obj_newObject("edit")); obj.edit288:setParent(obj.layout49); obj.edit288:setVertTextAlign("center"); obj.edit288:setLeft(940); obj.edit288:setTop(30); obj.edit288:setWidth(120); obj.edit288:setHeight(25); obj.edit288:setField("efeitoContest2"); obj.edit288:setName("edit288"); obj.label236 = GUI.fromHandle(_obj_newObject("label")); obj.label236:setParent(obj.layout49); obj.label236:setLeft(875); obj.label236:setTop(55); obj.label236:setWidth(80); obj.label236:setHeight(25); obj.label236:setText("Bôn.Dano"); lfm_setPropAsString(obj.label236, "fontStyle", "bold"); obj.label236:setName("label236"); obj.edit289 = GUI.fromHandle(_obj_newObject("edit")); obj.edit289:setParent(obj.layout49); obj.edit289:setVertTextAlign("center"); obj.edit289:setLeft(940); obj.edit289:setTop(55); obj.edit289:setWidth(120); obj.edit289:setHeight(25); obj.edit289:setField("BDano2"); obj.edit289:setName("edit289"); obj.layout50 = GUI.fromHandle(_obj_newObject("layout")); obj.layout50:setParent(obj.layout47); obj.layout50:setLeft(2); obj.layout50:setTop(192); obj.layout50:setWidth(1207); obj.layout50:setHeight(92); obj.layout50:setName("layout50"); obj.rectangle63 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle63:setParent(obj.layout50); obj.rectangle63:setAlign("client"); obj.rectangle63:setColor("black"); obj.rectangle63:setName("rectangle63"); obj.label237 = GUI.fromHandle(_obj_newObject("label")); obj.label237:setParent(obj.layout50); obj.label237:setLeft(5); obj.label237:setTop(5); obj.label237:setWidth(70); obj.label237:setHeight(25); obj.label237:setText("Golpe"); lfm_setPropAsString(obj.label237, "fontStyle", "bold"); obj.label237:setName("label237"); obj.edit290 = GUI.fromHandle(_obj_newObject("edit")); obj.edit290:setParent(obj.layout50); obj.edit290:setVertTextAlign("center"); obj.edit290:setLeft(75); obj.edit290:setTop(5); obj.edit290:setWidth(160); obj.edit290:setHeight(25); obj.edit290:setField("golpe3"); obj.edit290:setName("edit290"); obj.label238 = GUI.fromHandle(_obj_newObject("label")); obj.label238:setParent(obj.layout50); obj.label238:setLeft(5); obj.label238:setTop(30); obj.label238:setWidth(80); obj.label238:setHeight(25); obj.label238:setText("Descritores"); lfm_setPropAsString(obj.label238, "fontStyle", "bold"); obj.label238:setName("label238"); obj.edit291 = GUI.fromHandle(_obj_newObject("edit")); obj.edit291:setParent(obj.layout50); obj.edit291:setVertTextAlign("center"); obj.edit291:setLeft(75); obj.edit291:setTop(30); obj.edit291:setWidth(160); obj.edit291:setHeight(25); obj.edit291:setField("Descritores3"); obj.edit291:setName("edit291"); obj.label239 = GUI.fromHandle(_obj_newObject("label")); obj.label239:setParent(obj.layout50); obj.label239:setLeft(5); obj.label239:setTop(55); obj.label239:setWidth(70); obj.label239:setHeight(25); obj.label239:setText("Alcance"); lfm_setPropAsString(obj.label239, "fontStyle", "bold"); obj.label239:setName("label239"); obj.edit292 = GUI.fromHandle(_obj_newObject("edit")); obj.edit292:setParent(obj.layout50); obj.edit292:setVertTextAlign("center"); obj.edit292:setLeft(75); obj.edit292:setTop(55); obj.edit292:setWidth(160); obj.edit292:setHeight(25); obj.edit292:setField("alcance3"); obj.edit292:setName("edit292"); obj.label240 = GUI.fromHandle(_obj_newObject("label")); obj.label240:setParent(obj.layout50); obj.label240:setLeft(240); obj.label240:setTop(6); obj.label240:setWidth(50); obj.label240:setHeight(25); obj.label240:setText("Tipo"); lfm_setPropAsString(obj.label240, "fontStyle", "bold"); obj.label240:setName("label240"); obj.edit293 = GUI.fromHandle(_obj_newObject("edit")); obj.edit293:setParent(obj.layout50); obj.edit293:setVertTextAlign("center"); obj.edit293:setLeft(282); obj.edit293:setTop(6); obj.edit293:setWidth(82); obj.edit293:setHeight(25); obj.edit293:setField("tipo3"); obj.edit293:setName("edit293"); obj.label241 = GUI.fromHandle(_obj_newObject("label")); obj.label241:setParent(obj.layout50); obj.label241:setLeft(240); obj.label241:setTop(31); obj.label241:setWidth(50); obj.label241:setHeight(25); obj.label241:setText("Classe"); lfm_setPropAsString(obj.label241, "fontStyle", "bold"); obj.label241:setName("label241"); obj.comboBox23 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox23:setParent(obj.layout50); obj.comboBox23:setLeft(282); obj.comboBox23:setTop(31); obj.comboBox23:setWidth(82); obj.comboBox23:setHeight(25); obj.comboBox23:setField("classe3"); obj.comboBox23:setHorzTextAlign("center"); obj.comboBox23:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox23:setValues({'1', '2', '3'}); obj.comboBox23:setName("comboBox23"); obj.label242 = GUI.fromHandle(_obj_newObject("label")); obj.label242:setParent(obj.layout50); obj.label242:setLeft(240); obj.label242:setTop(55); obj.label242:setWidth(50); obj.label242:setHeight(25); obj.label242:setText("Freq."); lfm_setPropAsString(obj.label242, "fontStyle", "bold"); obj.label242:setName("label242"); obj.edit294 = GUI.fromHandle(_obj_newObject("edit")); obj.edit294:setParent(obj.layout50); obj.edit294:setVertTextAlign("center"); obj.edit294:setLeft(282); obj.edit294:setTop(55); obj.edit294:setWidth(82); obj.edit294:setHeight(25); obj.edit294:setField("frequencia3"); obj.edit294:setName("edit294"); obj.label243 = GUI.fromHandle(_obj_newObject("label")); obj.label243:setParent(obj.layout50); obj.label243:setLeft(370); obj.label243:setTop(6); obj.label243:setWidth(70); obj.label243:setHeight(25); obj.label243:setText("Acurácia"); lfm_setPropAsString(obj.label243, "fontStyle", "bold"); obj.label243:setName("label243"); obj.edit295 = GUI.fromHandle(_obj_newObject("edit")); obj.edit295:setParent(obj.layout50); obj.edit295:setVertTextAlign("center"); obj.edit295:setLeft(425); obj.edit295:setTop(6); obj.edit295:setWidth(53); obj.edit295:setHeight(25); obj.edit295:setField("Acc3"); obj.edit295:setType("number"); obj.edit295:setName("edit295"); obj.label244 = GUI.fromHandle(_obj_newObject("label")); obj.label244:setParent(obj.layout50); obj.label244:setLeft(370); obj.label244:setTop(31); obj.label244:setWidth(70); obj.label244:setHeight(25); obj.label244:setText("Prec.Bôn."); lfm_setPropAsString(obj.label244, "fontStyle", "bold"); obj.label244:setName("label244"); obj.edit296 = GUI.fromHandle(_obj_newObject("edit")); obj.edit296:setParent(obj.layout50); obj.edit296:setVertTextAlign("center"); obj.edit296:setLeft(425); obj.edit296:setTop(31); obj.edit296:setWidth(53); obj.edit296:setHeight(25); obj.edit296:setField("ataque3"); obj.edit296:setType("number"); obj.edit296:setName("edit296"); obj.label245 = GUI.fromHandle(_obj_newObject("label")); obj.label245:setParent(obj.layout50); obj.label245:setLeft(370); obj.label245:setTop(55); obj.label245:setWidth(70); obj.label245:setHeight(25); obj.label245:setText("D. Base"); lfm_setPropAsString(obj.label245, "fontStyle", "bold"); obj.label245:setName("label245"); obj.edit297 = GUI.fromHandle(_obj_newObject("edit")); obj.edit297:setParent(obj.layout50); obj.edit297:setVertTextAlign("center"); obj.edit297:setLeft(425); obj.edit297:setTop(55); obj.edit297:setWidth(53); obj.edit297:setHeight(25); obj.edit297:setField("dano3"); obj.edit297:setName("edit297"); obj.button43 = GUI.fromHandle(_obj_newObject("button")); obj.button43:setParent(obj.layout50); obj.button43:setLeft(488); obj.button43:setTop(6); obj.button43:setWidth(82); obj.button43:setText("Acerto"); obj.button43:setFontSize(11); lfm_setPropAsString(obj.button43, "fontStyle", "bold"); obj.button43:setName("button43"); obj.button44 = GUI.fromHandle(_obj_newObject("button")); obj.button44:setParent(obj.layout50); obj.button44:setLeft(488); obj.button44:setTop(31); obj.button44:setWidth(82); obj.button44:setText("Dano"); obj.button44:setFontSize(11); lfm_setPropAsString(obj.button44, "fontStyle", "bold"); obj.button44:setName("button44"); obj.button45 = GUI.fromHandle(_obj_newObject("button")); obj.button45:setParent(obj.layout50); obj.button45:setLeft(488); obj.button45:setTop(55); obj.button45:setWidth(82); obj.button45:setText("Crítico"); obj.button45:setFontSize(11); lfm_setPropAsString(obj.button45, "fontStyle", "bold"); obj.button45:setName("button45"); obj.textEditor17 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor17:setParent(obj.layout50); obj.textEditor17:setLeft(575); obj.textEditor17:setTop(5); obj.textEditor17:setWidth(295); obj.textEditor17:setHeight(75); obj.textEditor17:setField("campoEfeitoGolpes3"); obj.textEditor17:setName("textEditor17"); obj.label246 = GUI.fromHandle(_obj_newObject("label")); obj.label246:setParent(obj.layout50); obj.label246:setLeft(875); obj.label246:setTop(5); obj.label246:setWidth(80); obj.label246:setHeight(25); obj.label246:setText("Aptidão"); lfm_setPropAsString(obj.label246, "fontStyle", "bold"); obj.label246:setName("label246"); obj.edit298 = GUI.fromHandle(_obj_newObject("edit")); obj.edit298:setParent(obj.layout50); obj.edit298:setVertTextAlign("center"); obj.edit298:setLeft(940); obj.edit298:setTop(5); obj.edit298:setWidth(120); obj.edit298:setHeight(25); obj.edit298:setField("tipoContest3"); obj.edit298:setName("edit298"); obj.label247 = GUI.fromHandle(_obj_newObject("label")); obj.label247:setParent(obj.layout50); obj.label247:setLeft(875); obj.label247:setTop(30); obj.label247:setWidth(80); obj.label247:setHeight(25); obj.label247:setText("Concursos"); lfm_setPropAsString(obj.label247, "fontStyle", "bold"); obj.label247:setName("label247"); obj.edit299 = GUI.fromHandle(_obj_newObject("edit")); obj.edit299:setParent(obj.layout50); obj.edit299:setVertTextAlign("center"); obj.edit299:setLeft(940); obj.edit299:setTop(30); obj.edit299:setWidth(120); obj.edit299:setHeight(25); obj.edit299:setField("efeitoContest3"); obj.edit299:setName("edit299"); obj.label248 = GUI.fromHandle(_obj_newObject("label")); obj.label248:setParent(obj.layout50); obj.label248:setLeft(875); obj.label248:setTop(55); obj.label248:setWidth(80); obj.label248:setHeight(25); obj.label248:setText("Bôn.Dano"); lfm_setPropAsString(obj.label248, "fontStyle", "bold"); obj.label248:setName("label248"); obj.edit300 = GUI.fromHandle(_obj_newObject("edit")); obj.edit300:setParent(obj.layout50); obj.edit300:setVertTextAlign("center"); obj.edit300:setLeft(940); obj.edit300:setTop(55); obj.edit300:setWidth(120); obj.edit300:setHeight(25); obj.edit300:setField("BDano3"); obj.edit300:setName("edit300"); obj.layout51 = GUI.fromHandle(_obj_newObject("layout")); obj.layout51:setParent(obj.layout47); obj.layout51:setLeft(2); obj.layout51:setTop(288); obj.layout51:setWidth(1207); obj.layout51:setHeight(92); obj.layout51:setName("layout51"); obj.rectangle64 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle64:setParent(obj.layout51); obj.rectangle64:setAlign("client"); obj.rectangle64:setColor("black"); obj.rectangle64:setName("rectangle64"); obj.label249 = GUI.fromHandle(_obj_newObject("label")); obj.label249:setParent(obj.layout51); obj.label249:setLeft(5); obj.label249:setTop(5); obj.label249:setWidth(70); obj.label249:setHeight(25); obj.label249:setText("Golpe"); lfm_setPropAsString(obj.label249, "fontStyle", "bold"); obj.label249:setName("label249"); obj.edit301 = GUI.fromHandle(_obj_newObject("edit")); obj.edit301:setParent(obj.layout51); obj.edit301:setVertTextAlign("center"); obj.edit301:setLeft(75); obj.edit301:setTop(5); obj.edit301:setWidth(160); obj.edit301:setHeight(25); obj.edit301:setField("golpe4"); obj.edit301:setName("edit301"); obj.label250 = GUI.fromHandle(_obj_newObject("label")); obj.label250:setParent(obj.layout51); obj.label250:setLeft(5); obj.label250:setTop(30); obj.label250:setWidth(80); obj.label250:setHeight(25); obj.label250:setText("Descritores"); lfm_setPropAsString(obj.label250, "fontStyle", "bold"); obj.label250:setName("label250"); obj.edit302 = GUI.fromHandle(_obj_newObject("edit")); obj.edit302:setParent(obj.layout51); obj.edit302:setVertTextAlign("center"); obj.edit302:setLeft(75); obj.edit302:setTop(30); obj.edit302:setWidth(160); obj.edit302:setHeight(25); obj.edit302:setField("Descritores4"); obj.edit302:setName("edit302"); obj.label251 = GUI.fromHandle(_obj_newObject("label")); obj.label251:setParent(obj.layout51); obj.label251:setLeft(5); obj.label251:setTop(55); obj.label251:setWidth(70); obj.label251:setHeight(25); obj.label251:setText("Alcance"); lfm_setPropAsString(obj.label251, "fontStyle", "bold"); obj.label251:setName("label251"); obj.edit303 = GUI.fromHandle(_obj_newObject("edit")); obj.edit303:setParent(obj.layout51); obj.edit303:setVertTextAlign("center"); obj.edit303:setLeft(75); obj.edit303:setTop(55); obj.edit303:setWidth(160); obj.edit303:setHeight(25); obj.edit303:setField("alcance4"); obj.edit303:setName("edit303"); obj.label252 = GUI.fromHandle(_obj_newObject("label")); obj.label252:setParent(obj.layout51); obj.label252:setLeft(240); obj.label252:setTop(6); obj.label252:setWidth(50); obj.label252:setHeight(25); obj.label252:setText("Tipo"); lfm_setPropAsString(obj.label252, "fontStyle", "bold"); obj.label252:setName("label252"); obj.edit304 = GUI.fromHandle(_obj_newObject("edit")); obj.edit304:setParent(obj.layout51); obj.edit304:setVertTextAlign("center"); obj.edit304:setLeft(282); obj.edit304:setTop(6); obj.edit304:setWidth(82); obj.edit304:setHeight(25); obj.edit304:setField("tipo4"); obj.edit304:setName("edit304"); obj.label253 = GUI.fromHandle(_obj_newObject("label")); obj.label253:setParent(obj.layout51); obj.label253:setLeft(240); obj.label253:setTop(31); obj.label253:setWidth(50); obj.label253:setHeight(25); obj.label253:setText("Classe"); lfm_setPropAsString(obj.label253, "fontStyle", "bold"); obj.label253:setName("label253"); obj.comboBox24 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox24:setParent(obj.layout51); obj.comboBox24:setLeft(282); obj.comboBox24:setTop(31); obj.comboBox24:setWidth(82); obj.comboBox24:setHeight(25); obj.comboBox24:setField("classe4"); obj.comboBox24:setHorzTextAlign("center"); obj.comboBox24:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox24:setValues({'1', '2', '3'}); obj.comboBox24:setName("comboBox24"); obj.label254 = GUI.fromHandle(_obj_newObject("label")); obj.label254:setParent(obj.layout51); obj.label254:setLeft(240); obj.label254:setTop(55); obj.label254:setWidth(50); obj.label254:setHeight(25); obj.label254:setText("Freq."); lfm_setPropAsString(obj.label254, "fontStyle", "bold"); obj.label254:setName("label254"); obj.edit305 = GUI.fromHandle(_obj_newObject("edit")); obj.edit305:setParent(obj.layout51); obj.edit305:setVertTextAlign("center"); obj.edit305:setLeft(282); obj.edit305:setTop(55); obj.edit305:setWidth(82); obj.edit305:setHeight(25); obj.edit305:setField("frequencia4"); obj.edit305:setName("edit305"); obj.label255 = GUI.fromHandle(_obj_newObject("label")); obj.label255:setParent(obj.layout51); obj.label255:setLeft(370); obj.label255:setTop(6); obj.label255:setWidth(70); obj.label255:setHeight(25); obj.label255:setText("Acurácia"); lfm_setPropAsString(obj.label255, "fontStyle", "bold"); obj.label255:setName("label255"); obj.edit306 = GUI.fromHandle(_obj_newObject("edit")); obj.edit306:setParent(obj.layout51); obj.edit306:setVertTextAlign("center"); obj.edit306:setLeft(425); obj.edit306:setTop(6); obj.edit306:setWidth(53); obj.edit306:setHeight(25); obj.edit306:setField("Acc4"); obj.edit306:setType("number"); obj.edit306:setName("edit306"); obj.label256 = GUI.fromHandle(_obj_newObject("label")); obj.label256:setParent(obj.layout51); obj.label256:setLeft(370); obj.label256:setTop(31); obj.label256:setWidth(70); obj.label256:setHeight(25); obj.label256:setText("Prec.Bôn."); lfm_setPropAsString(obj.label256, "fontStyle", "bold"); obj.label256:setName("label256"); obj.edit307 = GUI.fromHandle(_obj_newObject("edit")); obj.edit307:setParent(obj.layout51); obj.edit307:setVertTextAlign("center"); obj.edit307:setLeft(425); obj.edit307:setTop(31); obj.edit307:setWidth(53); obj.edit307:setHeight(25); obj.edit307:setField("ataque4"); obj.edit307:setType("number"); obj.edit307:setName("edit307"); obj.label257 = GUI.fromHandle(_obj_newObject("label")); obj.label257:setParent(obj.layout51); obj.label257:setLeft(370); obj.label257:setTop(55); obj.label257:setWidth(70); obj.label257:setHeight(25); obj.label257:setText("D. Base"); lfm_setPropAsString(obj.label257, "fontStyle", "bold"); obj.label257:setName("label257"); obj.edit308 = GUI.fromHandle(_obj_newObject("edit")); obj.edit308:setParent(obj.layout51); obj.edit308:setVertTextAlign("center"); obj.edit308:setLeft(425); obj.edit308:setTop(55); obj.edit308:setWidth(53); obj.edit308:setHeight(25); obj.edit308:setField("dano4"); obj.edit308:setName("edit308"); obj.button46 = GUI.fromHandle(_obj_newObject("button")); obj.button46:setParent(obj.layout51); obj.button46:setLeft(488); obj.button46:setTop(6); obj.button46:setWidth(82); obj.button46:setText("Acerto"); obj.button46:setFontSize(11); lfm_setPropAsString(obj.button46, "fontStyle", "bold"); obj.button46:setName("button46"); obj.button47 = GUI.fromHandle(_obj_newObject("button")); obj.button47:setParent(obj.layout51); obj.button47:setLeft(488); obj.button47:setTop(31); obj.button47:setWidth(82); obj.button47:setText("Dano"); obj.button47:setFontSize(11); lfm_setPropAsString(obj.button47, "fontStyle", "bold"); obj.button47:setName("button47"); obj.button48 = GUI.fromHandle(_obj_newObject("button")); obj.button48:setParent(obj.layout51); obj.button48:setLeft(488); obj.button48:setTop(55); obj.button48:setWidth(82); obj.button48:setText("Crítico"); obj.button48:setFontSize(11); lfm_setPropAsString(obj.button48, "fontStyle", "bold"); obj.button48:setName("button48"); obj.textEditor18 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor18:setParent(obj.layout51); obj.textEditor18:setLeft(575); obj.textEditor18:setTop(5); obj.textEditor18:setWidth(295); obj.textEditor18:setHeight(75); obj.textEditor18:setField("campoEfeitoGolpes4"); obj.textEditor18:setName("textEditor18"); obj.label258 = GUI.fromHandle(_obj_newObject("label")); obj.label258:setParent(obj.layout51); obj.label258:setLeft(875); obj.label258:setTop(5); obj.label258:setWidth(80); obj.label258:setHeight(25); obj.label258:setText("Aptidão"); lfm_setPropAsString(obj.label258, "fontStyle", "bold"); obj.label258:setName("label258"); obj.edit309 = GUI.fromHandle(_obj_newObject("edit")); obj.edit309:setParent(obj.layout51); obj.edit309:setVertTextAlign("center"); obj.edit309:setLeft(940); obj.edit309:setTop(5); obj.edit309:setWidth(120); obj.edit309:setHeight(25); obj.edit309:setField("tipoContest4"); obj.edit309:setName("edit309"); obj.label259 = GUI.fromHandle(_obj_newObject("label")); obj.label259:setParent(obj.layout51); obj.label259:setLeft(875); obj.label259:setTop(30); obj.label259:setWidth(80); obj.label259:setHeight(25); obj.label259:setText("Concursos"); lfm_setPropAsString(obj.label259, "fontStyle", "bold"); obj.label259:setName("label259"); obj.edit310 = GUI.fromHandle(_obj_newObject("edit")); obj.edit310:setParent(obj.layout51); obj.edit310:setVertTextAlign("center"); obj.edit310:setLeft(940); obj.edit310:setTop(30); obj.edit310:setWidth(120); obj.edit310:setHeight(25); obj.edit310:setField("efeitoContest4"); obj.edit310:setName("edit310"); obj.label260 = GUI.fromHandle(_obj_newObject("label")); obj.label260:setParent(obj.layout51); obj.label260:setLeft(875); obj.label260:setTop(55); obj.label260:setWidth(80); obj.label260:setHeight(25); obj.label260:setText("Bôn.Dano"); lfm_setPropAsString(obj.label260, "fontStyle", "bold"); obj.label260:setName("label260"); obj.edit311 = GUI.fromHandle(_obj_newObject("edit")); obj.edit311:setParent(obj.layout51); obj.edit311:setVertTextAlign("center"); obj.edit311:setLeft(940); obj.edit311:setTop(55); obj.edit311:setWidth(120); obj.edit311:setHeight(25); obj.edit311:setField("BDano4"); obj.edit311:setName("edit311"); obj.layout52 = GUI.fromHandle(_obj_newObject("layout")); obj.layout52:setParent(obj.layout47); obj.layout52:setLeft(2); obj.layout52:setTop(383); obj.layout52:setWidth(1207); obj.layout52:setHeight(92); obj.layout52:setName("layout52"); obj.rectangle65 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle65:setParent(obj.layout52); obj.rectangle65:setAlign("client"); obj.rectangle65:setColor("black"); obj.rectangle65:setName("rectangle65"); obj.label261 = GUI.fromHandle(_obj_newObject("label")); obj.label261:setParent(obj.layout52); obj.label261:setLeft(5); obj.label261:setTop(5); obj.label261:setWidth(70); obj.label261:setHeight(25); obj.label261:setText("Golpe"); lfm_setPropAsString(obj.label261, "fontStyle", "bold"); obj.label261:setName("label261"); obj.edit312 = GUI.fromHandle(_obj_newObject("edit")); obj.edit312:setParent(obj.layout52); obj.edit312:setVertTextAlign("center"); obj.edit312:setLeft(75); obj.edit312:setTop(5); obj.edit312:setWidth(160); obj.edit312:setHeight(25); obj.edit312:setField("golpe5"); obj.edit312:setName("edit312"); obj.label262 = GUI.fromHandle(_obj_newObject("label")); obj.label262:setParent(obj.layout52); obj.label262:setLeft(5); obj.label262:setTop(30); obj.label262:setWidth(80); obj.label262:setHeight(25); obj.label262:setText("Descritores"); lfm_setPropAsString(obj.label262, "fontStyle", "bold"); obj.label262:setName("label262"); obj.edit313 = GUI.fromHandle(_obj_newObject("edit")); obj.edit313:setParent(obj.layout52); obj.edit313:setVertTextAlign("center"); obj.edit313:setLeft(75); obj.edit313:setTop(30); obj.edit313:setWidth(160); obj.edit313:setHeight(25); obj.edit313:setField("Descritores5"); obj.edit313:setName("edit313"); obj.label263 = GUI.fromHandle(_obj_newObject("label")); obj.label263:setParent(obj.layout52); obj.label263:setLeft(5); obj.label263:setTop(55); obj.label263:setWidth(70); obj.label263:setHeight(25); obj.label263:setText("Alcance"); lfm_setPropAsString(obj.label263, "fontStyle", "bold"); obj.label263:setName("label263"); obj.edit314 = GUI.fromHandle(_obj_newObject("edit")); obj.edit314:setParent(obj.layout52); obj.edit314:setVertTextAlign("center"); obj.edit314:setLeft(75); obj.edit314:setTop(55); obj.edit314:setWidth(160); obj.edit314:setHeight(25); obj.edit314:setField("alcance5"); obj.edit314:setName("edit314"); obj.label264 = GUI.fromHandle(_obj_newObject("label")); obj.label264:setParent(obj.layout52); obj.label264:setLeft(240); obj.label264:setTop(6); obj.label264:setWidth(50); obj.label264:setHeight(25); obj.label264:setText("Tipo"); lfm_setPropAsString(obj.label264, "fontStyle", "bold"); obj.label264:setName("label264"); obj.edit315 = GUI.fromHandle(_obj_newObject("edit")); obj.edit315:setParent(obj.layout52); obj.edit315:setVertTextAlign("center"); obj.edit315:setLeft(282); obj.edit315:setTop(6); obj.edit315:setWidth(82); obj.edit315:setHeight(25); obj.edit315:setField("tipo5"); obj.edit315:setName("edit315"); obj.label265 = GUI.fromHandle(_obj_newObject("label")); obj.label265:setParent(obj.layout52); obj.label265:setLeft(240); obj.label265:setTop(31); obj.label265:setWidth(50); obj.label265:setHeight(25); obj.label265:setText("Classe"); lfm_setPropAsString(obj.label265, "fontStyle", "bold"); obj.label265:setName("label265"); obj.comboBox25 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox25:setParent(obj.layout52); obj.comboBox25:setLeft(282); obj.comboBox25:setTop(31); obj.comboBox25:setWidth(82); obj.comboBox25:setHeight(25); obj.comboBox25:setField("classe5"); obj.comboBox25:setHorzTextAlign("center"); obj.comboBox25:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox25:setValues({'1', '2', '3'}); obj.comboBox25:setName("comboBox25"); obj.label266 = GUI.fromHandle(_obj_newObject("label")); obj.label266:setParent(obj.layout52); obj.label266:setLeft(240); obj.label266:setTop(55); obj.label266:setWidth(50); obj.label266:setHeight(25); obj.label266:setText("Freq."); lfm_setPropAsString(obj.label266, "fontStyle", "bold"); obj.label266:setName("label266"); obj.edit316 = GUI.fromHandle(_obj_newObject("edit")); obj.edit316:setParent(obj.layout52); obj.edit316:setVertTextAlign("center"); obj.edit316:setLeft(282); obj.edit316:setTop(55); obj.edit316:setWidth(82); obj.edit316:setHeight(25); obj.edit316:setField("frequencia5"); obj.edit316:setName("edit316"); obj.label267 = GUI.fromHandle(_obj_newObject("label")); obj.label267:setParent(obj.layout52); obj.label267:setLeft(370); obj.label267:setTop(6); obj.label267:setWidth(70); obj.label267:setHeight(25); obj.label267:setText("Acurácia"); lfm_setPropAsString(obj.label267, "fontStyle", "bold"); obj.label267:setName("label267"); obj.edit317 = GUI.fromHandle(_obj_newObject("edit")); obj.edit317:setParent(obj.layout52); obj.edit317:setVertTextAlign("center"); obj.edit317:setLeft(425); obj.edit317:setTop(6); obj.edit317:setWidth(53); obj.edit317:setHeight(25); obj.edit317:setField("Acc5"); obj.edit317:setType("number"); obj.edit317:setName("edit317"); obj.label268 = GUI.fromHandle(_obj_newObject("label")); obj.label268:setParent(obj.layout52); obj.label268:setLeft(370); obj.label268:setTop(31); obj.label268:setWidth(70); obj.label268:setHeight(25); obj.label268:setText("Prec.Bôn."); lfm_setPropAsString(obj.label268, "fontStyle", "bold"); obj.label268:setName("label268"); obj.edit318 = GUI.fromHandle(_obj_newObject("edit")); obj.edit318:setParent(obj.layout52); obj.edit318:setVertTextAlign("center"); obj.edit318:setLeft(425); obj.edit318:setTop(31); obj.edit318:setWidth(53); obj.edit318:setHeight(25); obj.edit318:setField("ataque5"); obj.edit318:setType("number"); obj.edit318:setName("edit318"); obj.label269 = GUI.fromHandle(_obj_newObject("label")); obj.label269:setParent(obj.layout52); obj.label269:setLeft(370); obj.label269:setTop(55); obj.label269:setWidth(70); obj.label269:setHeight(25); obj.label269:setText("D. Base"); lfm_setPropAsString(obj.label269, "fontStyle", "bold"); obj.label269:setName("label269"); obj.edit319 = GUI.fromHandle(_obj_newObject("edit")); obj.edit319:setParent(obj.layout52); obj.edit319:setVertTextAlign("center"); obj.edit319:setLeft(425); obj.edit319:setTop(55); obj.edit319:setWidth(53); obj.edit319:setHeight(25); obj.edit319:setField("dano5"); obj.edit319:setName("edit319"); obj.button49 = GUI.fromHandle(_obj_newObject("button")); obj.button49:setParent(obj.layout52); obj.button49:setLeft(488); obj.button49:setTop(6); obj.button49:setWidth(82); obj.button49:setText("Acerto"); obj.button49:setFontSize(11); lfm_setPropAsString(obj.button49, "fontStyle", "bold"); obj.button49:setName("button49"); obj.button50 = GUI.fromHandle(_obj_newObject("button")); obj.button50:setParent(obj.layout52); obj.button50:setLeft(488); obj.button50:setTop(31); obj.button50:setWidth(82); obj.button50:setText("Dano"); obj.button50:setFontSize(11); lfm_setPropAsString(obj.button50, "fontStyle", "bold"); obj.button50:setName("button50"); obj.button51 = GUI.fromHandle(_obj_newObject("button")); obj.button51:setParent(obj.layout52); obj.button51:setLeft(488); obj.button51:setTop(55); obj.button51:setWidth(82); obj.button51:setText("Crítico"); obj.button51:setFontSize(11); lfm_setPropAsString(obj.button51, "fontStyle", "bold"); obj.button51:setName("button51"); obj.textEditor19 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor19:setParent(obj.layout52); obj.textEditor19:setLeft(575); obj.textEditor19:setTop(5); obj.textEditor19:setWidth(295); obj.textEditor19:setHeight(75); obj.textEditor19:setField("campoEfeitoGolpes5"); obj.textEditor19:setName("textEditor19"); obj.label270 = GUI.fromHandle(_obj_newObject("label")); obj.label270:setParent(obj.layout52); obj.label270:setLeft(875); obj.label270:setTop(5); obj.label270:setWidth(80); obj.label270:setHeight(25); obj.label270:setText("Aptidão"); lfm_setPropAsString(obj.label270, "fontStyle", "bold"); obj.label270:setName("label270"); obj.edit320 = GUI.fromHandle(_obj_newObject("edit")); obj.edit320:setParent(obj.layout52); obj.edit320:setVertTextAlign("center"); obj.edit320:setLeft(940); obj.edit320:setTop(5); obj.edit320:setWidth(120); obj.edit320:setHeight(25); obj.edit320:setField("tipoContest5"); obj.edit320:setName("edit320"); obj.label271 = GUI.fromHandle(_obj_newObject("label")); obj.label271:setParent(obj.layout52); obj.label271:setLeft(875); obj.label271:setTop(30); obj.label271:setWidth(80); obj.label271:setHeight(25); obj.label271:setText("Concursos"); lfm_setPropAsString(obj.label271, "fontStyle", "bold"); obj.label271:setName("label271"); obj.edit321 = GUI.fromHandle(_obj_newObject("edit")); obj.edit321:setParent(obj.layout52); obj.edit321:setVertTextAlign("center"); obj.edit321:setLeft(940); obj.edit321:setTop(30); obj.edit321:setWidth(120); obj.edit321:setHeight(25); obj.edit321:setField("efeitoContest5"); obj.edit321:setName("edit321"); obj.label272 = GUI.fromHandle(_obj_newObject("label")); obj.label272:setParent(obj.layout52); obj.label272:setLeft(875); obj.label272:setTop(55); obj.label272:setWidth(80); obj.label272:setHeight(25); obj.label272:setText("Bôn.Dano"); lfm_setPropAsString(obj.label272, "fontStyle", "bold"); obj.label272:setName("label272"); obj.edit322 = GUI.fromHandle(_obj_newObject("edit")); obj.edit322:setParent(obj.layout52); obj.edit322:setVertTextAlign("center"); obj.edit322:setLeft(940); obj.edit322:setTop(55); obj.edit322:setWidth(120); obj.edit322:setHeight(25); obj.edit322:setField("BDano5"); obj.edit322:setName("edit322"); obj.layout53 = GUI.fromHandle(_obj_newObject("layout")); obj.layout53:setParent(obj.layout47); obj.layout53:setLeft(2); obj.layout53:setTop(478); obj.layout53:setWidth(1207); obj.layout53:setHeight(92); obj.layout53:setName("layout53"); obj.rectangle66 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle66:setParent(obj.layout53); obj.rectangle66:setAlign("client"); obj.rectangle66:setColor("black"); obj.rectangle66:setName("rectangle66"); obj.label273 = GUI.fromHandle(_obj_newObject("label")); obj.label273:setParent(obj.layout53); obj.label273:setLeft(5); obj.label273:setTop(5); obj.label273:setWidth(70); obj.label273:setHeight(25); obj.label273:setText("Golpe"); lfm_setPropAsString(obj.label273, "fontStyle", "bold"); obj.label273:setName("label273"); obj.edit323 = GUI.fromHandle(_obj_newObject("edit")); obj.edit323:setParent(obj.layout53); obj.edit323:setVertTextAlign("center"); obj.edit323:setLeft(75); obj.edit323:setTop(5); obj.edit323:setWidth(160); obj.edit323:setHeight(25); obj.edit323:setField("golpe6"); obj.edit323:setName("edit323"); obj.label274 = GUI.fromHandle(_obj_newObject("label")); obj.label274:setParent(obj.layout53); obj.label274:setLeft(5); obj.label274:setTop(30); obj.label274:setWidth(80); obj.label274:setHeight(25); obj.label274:setText("Descritores"); lfm_setPropAsString(obj.label274, "fontStyle", "bold"); obj.label274:setName("label274"); obj.edit324 = GUI.fromHandle(_obj_newObject("edit")); obj.edit324:setParent(obj.layout53); obj.edit324:setVertTextAlign("center"); obj.edit324:setLeft(75); obj.edit324:setTop(30); obj.edit324:setWidth(160); obj.edit324:setHeight(25); obj.edit324:setField("Descritores6"); obj.edit324:setName("edit324"); obj.label275 = GUI.fromHandle(_obj_newObject("label")); obj.label275:setParent(obj.layout53); obj.label275:setLeft(5); obj.label275:setTop(55); obj.label275:setWidth(70); obj.label275:setHeight(25); obj.label275:setText("Alcance"); lfm_setPropAsString(obj.label275, "fontStyle", "bold"); obj.label275:setName("label275"); obj.edit325 = GUI.fromHandle(_obj_newObject("edit")); obj.edit325:setParent(obj.layout53); obj.edit325:setVertTextAlign("center"); obj.edit325:setLeft(75); obj.edit325:setTop(55); obj.edit325:setWidth(160); obj.edit325:setHeight(25); obj.edit325:setField("alcance6"); obj.edit325:setName("edit325"); obj.label276 = GUI.fromHandle(_obj_newObject("label")); obj.label276:setParent(obj.layout53); obj.label276:setLeft(240); obj.label276:setTop(6); obj.label276:setWidth(50); obj.label276:setHeight(25); obj.label276:setText("Tipo"); lfm_setPropAsString(obj.label276, "fontStyle", "bold"); obj.label276:setName("label276"); obj.edit326 = GUI.fromHandle(_obj_newObject("edit")); obj.edit326:setParent(obj.layout53); obj.edit326:setVertTextAlign("center"); obj.edit326:setLeft(282); obj.edit326:setTop(6); obj.edit326:setWidth(82); obj.edit326:setHeight(25); obj.edit326:setField("tipo6"); obj.edit326:setName("edit326"); obj.label277 = GUI.fromHandle(_obj_newObject("label")); obj.label277:setParent(obj.layout53); obj.label277:setLeft(240); obj.label277:setTop(31); obj.label277:setWidth(50); obj.label277:setHeight(25); obj.label277:setText("Classe"); lfm_setPropAsString(obj.label277, "fontStyle", "bold"); obj.label277:setName("label277"); obj.comboBox26 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox26:setParent(obj.layout53); obj.comboBox26:setLeft(282); obj.comboBox26:setTop(31); obj.comboBox26:setWidth(82); obj.comboBox26:setHeight(25); obj.comboBox26:setField("classe6"); obj.comboBox26:setHorzTextAlign("center"); obj.comboBox26:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox26:setValues({'1', '2', '3'}); obj.comboBox26:setName("comboBox26"); obj.label278 = GUI.fromHandle(_obj_newObject("label")); obj.label278:setParent(obj.layout53); obj.label278:setLeft(240); obj.label278:setTop(55); obj.label278:setWidth(50); obj.label278:setHeight(25); obj.label278:setText("Freq."); lfm_setPropAsString(obj.label278, "fontStyle", "bold"); obj.label278:setName("label278"); obj.edit327 = GUI.fromHandle(_obj_newObject("edit")); obj.edit327:setParent(obj.layout53); obj.edit327:setVertTextAlign("center"); obj.edit327:setLeft(282); obj.edit327:setTop(55); obj.edit327:setWidth(82); obj.edit327:setHeight(25); obj.edit327:setField("frequencia6"); obj.edit327:setName("edit327"); obj.label279 = GUI.fromHandle(_obj_newObject("label")); obj.label279:setParent(obj.layout53); obj.label279:setLeft(370); obj.label279:setTop(6); obj.label279:setWidth(70); obj.label279:setHeight(25); obj.label279:setText("Acurácia"); lfm_setPropAsString(obj.label279, "fontStyle", "bold"); obj.label279:setName("label279"); obj.edit328 = GUI.fromHandle(_obj_newObject("edit")); obj.edit328:setParent(obj.layout53); obj.edit328:setVertTextAlign("center"); obj.edit328:setLeft(425); obj.edit328:setTop(6); obj.edit328:setWidth(53); obj.edit328:setHeight(25); obj.edit328:setField("Acc6"); obj.edit328:setType("number"); obj.edit328:setName("edit328"); obj.label280 = GUI.fromHandle(_obj_newObject("label")); obj.label280:setParent(obj.layout53); obj.label280:setLeft(370); obj.label280:setTop(31); obj.label280:setWidth(70); obj.label280:setHeight(25); obj.label280:setText("Prec.Bôn."); lfm_setPropAsString(obj.label280, "fontStyle", "bold"); obj.label280:setName("label280"); obj.edit329 = GUI.fromHandle(_obj_newObject("edit")); obj.edit329:setParent(obj.layout53); obj.edit329:setVertTextAlign("center"); obj.edit329:setLeft(425); obj.edit329:setTop(31); obj.edit329:setWidth(53); obj.edit329:setHeight(25); obj.edit329:setField("ataque6"); obj.edit329:setType("number"); obj.edit329:setName("edit329"); obj.label281 = GUI.fromHandle(_obj_newObject("label")); obj.label281:setParent(obj.layout53); obj.label281:setLeft(370); obj.label281:setTop(55); obj.label281:setWidth(70); obj.label281:setHeight(25); obj.label281:setText("D. Base"); lfm_setPropAsString(obj.label281, "fontStyle", "bold"); obj.label281:setName("label281"); obj.edit330 = GUI.fromHandle(_obj_newObject("edit")); obj.edit330:setParent(obj.layout53); obj.edit330:setVertTextAlign("center"); obj.edit330:setLeft(425); obj.edit330:setTop(55); obj.edit330:setWidth(53); obj.edit330:setHeight(25); obj.edit330:setField("dano6"); obj.edit330:setName("edit330"); obj.button52 = GUI.fromHandle(_obj_newObject("button")); obj.button52:setParent(obj.layout53); obj.button52:setLeft(488); obj.button52:setTop(6); obj.button52:setWidth(82); obj.button52:setText("Acerto"); obj.button52:setFontSize(11); lfm_setPropAsString(obj.button52, "fontStyle", "bold"); obj.button52:setName("button52"); obj.button53 = GUI.fromHandle(_obj_newObject("button")); obj.button53:setParent(obj.layout53); obj.button53:setLeft(488); obj.button53:setTop(31); obj.button53:setWidth(82); obj.button53:setText("Dano"); obj.button53:setFontSize(11); lfm_setPropAsString(obj.button53, "fontStyle", "bold"); obj.button53:setName("button53"); obj.button54 = GUI.fromHandle(_obj_newObject("button")); obj.button54:setParent(obj.layout53); obj.button54:setLeft(488); obj.button54:setTop(55); obj.button54:setWidth(82); obj.button54:setText("Crítico"); obj.button54:setFontSize(11); lfm_setPropAsString(obj.button54, "fontStyle", "bold"); obj.button54:setName("button54"); obj.textEditor20 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor20:setParent(obj.layout53); obj.textEditor20:setLeft(575); obj.textEditor20:setTop(5); obj.textEditor20:setWidth(295); obj.textEditor20:setHeight(75); obj.textEditor20:setField("campoEfeitoGolpes6"); obj.textEditor20:setName("textEditor20"); obj.label282 = GUI.fromHandle(_obj_newObject("label")); obj.label282:setParent(obj.layout53); obj.label282:setLeft(875); obj.label282:setTop(5); obj.label282:setWidth(80); obj.label282:setHeight(25); obj.label282:setText("Aptidão"); lfm_setPropAsString(obj.label282, "fontStyle", "bold"); obj.label282:setName("label282"); obj.edit331 = GUI.fromHandle(_obj_newObject("edit")); obj.edit331:setParent(obj.layout53); obj.edit331:setVertTextAlign("center"); obj.edit331:setLeft(940); obj.edit331:setTop(5); obj.edit331:setWidth(120); obj.edit331:setHeight(25); obj.edit331:setField("tipoContest6"); obj.edit331:setName("edit331"); obj.label283 = GUI.fromHandle(_obj_newObject("label")); obj.label283:setParent(obj.layout53); obj.label283:setLeft(875); obj.label283:setTop(30); obj.label283:setWidth(80); obj.label283:setHeight(25); obj.label283:setText("Concursos"); lfm_setPropAsString(obj.label283, "fontStyle", "bold"); obj.label283:setName("label283"); obj.edit332 = GUI.fromHandle(_obj_newObject("edit")); obj.edit332:setParent(obj.layout53); obj.edit332:setVertTextAlign("center"); obj.edit332:setLeft(940); obj.edit332:setTop(30); obj.edit332:setWidth(120); obj.edit332:setHeight(25); obj.edit332:setField("efeitoContest6"); obj.edit332:setName("edit332"); obj.label284 = GUI.fromHandle(_obj_newObject("label")); obj.label284:setParent(obj.layout53); obj.label284:setLeft(875); obj.label284:setTop(55); obj.label284:setWidth(80); obj.label284:setHeight(25); obj.label284:setText("Bôn.Dano"); lfm_setPropAsString(obj.label284, "fontStyle", "bold"); obj.label284:setName("label284"); obj.edit333 = GUI.fromHandle(_obj_newObject("edit")); obj.edit333:setParent(obj.layout53); obj.edit333:setVertTextAlign("center"); obj.edit333:setLeft(940); obj.edit333:setTop(55); obj.edit333:setWidth(120); obj.edit333:setHeight(25); obj.edit333:setField("BDano6"); obj.edit333:setName("edit333"); obj.layout54 = GUI.fromHandle(_obj_newObject("layout")); obj.layout54:setParent(obj.layout47); obj.layout54:setLeft(2); obj.layout54:setTop(573); obj.layout54:setWidth(1207); obj.layout54:setHeight(92); obj.layout54:setName("layout54"); obj.rectangle67 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle67:setParent(obj.layout54); obj.rectangle67:setAlign("client"); obj.rectangle67:setColor("black"); obj.rectangle67:setName("rectangle67"); obj.label285 = GUI.fromHandle(_obj_newObject("label")); obj.label285:setParent(obj.layout54); obj.label285:setLeft(5); obj.label285:setTop(5); obj.label285:setWidth(70); obj.label285:setHeight(25); obj.label285:setText("Golpe"); lfm_setPropAsString(obj.label285, "fontStyle", "bold"); obj.label285:setName("label285"); obj.edit334 = GUI.fromHandle(_obj_newObject("edit")); obj.edit334:setParent(obj.layout54); obj.edit334:setVertTextAlign("center"); obj.edit334:setLeft(75); obj.edit334:setTop(5); obj.edit334:setWidth(160); obj.edit334:setHeight(25); obj.edit334:setField("golpe7"); obj.edit334:setName("edit334"); obj.label286 = GUI.fromHandle(_obj_newObject("label")); obj.label286:setParent(obj.layout54); obj.label286:setLeft(5); obj.label286:setTop(30); obj.label286:setWidth(80); obj.label286:setHeight(25); obj.label286:setText("Descritores"); lfm_setPropAsString(obj.label286, "fontStyle", "bold"); obj.label286:setName("label286"); obj.edit335 = GUI.fromHandle(_obj_newObject("edit")); obj.edit335:setParent(obj.layout54); obj.edit335:setVertTextAlign("center"); obj.edit335:setLeft(75); obj.edit335:setTop(30); obj.edit335:setWidth(160); obj.edit335:setHeight(25); obj.edit335:setField("Descritores7"); obj.edit335:setName("edit335"); obj.label287 = GUI.fromHandle(_obj_newObject("label")); obj.label287:setParent(obj.layout54); obj.label287:setLeft(5); obj.label287:setTop(55); obj.label287:setWidth(70); obj.label287:setHeight(25); obj.label287:setText("Alcance"); lfm_setPropAsString(obj.label287, "fontStyle", "bold"); obj.label287:setName("label287"); obj.edit336 = GUI.fromHandle(_obj_newObject("edit")); obj.edit336:setParent(obj.layout54); obj.edit336:setVertTextAlign("center"); obj.edit336:setLeft(75); obj.edit336:setTop(55); obj.edit336:setWidth(160); obj.edit336:setHeight(25); obj.edit336:setField("alcance7"); obj.edit336:setName("edit336"); obj.label288 = GUI.fromHandle(_obj_newObject("label")); obj.label288:setParent(obj.layout54); obj.label288:setLeft(240); obj.label288:setTop(6); obj.label288:setWidth(50); obj.label288:setHeight(25); obj.label288:setText("Tipo"); lfm_setPropAsString(obj.label288, "fontStyle", "bold"); obj.label288:setName("label288"); obj.edit337 = GUI.fromHandle(_obj_newObject("edit")); obj.edit337:setParent(obj.layout54); obj.edit337:setVertTextAlign("center"); obj.edit337:setLeft(282); obj.edit337:setTop(6); obj.edit337:setWidth(82); obj.edit337:setHeight(25); obj.edit337:setField("tipo7"); obj.edit337:setName("edit337"); obj.label289 = GUI.fromHandle(_obj_newObject("label")); obj.label289:setParent(obj.layout54); obj.label289:setLeft(240); obj.label289:setTop(31); obj.label289:setWidth(50); obj.label289:setHeight(25); obj.label289:setText("Classe"); lfm_setPropAsString(obj.label289, "fontStyle", "bold"); obj.label289:setName("label289"); obj.comboBox27 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox27:setParent(obj.layout54); obj.comboBox27:setLeft(282); obj.comboBox27:setTop(31); obj.comboBox27:setWidth(82); obj.comboBox27:setHeight(25); obj.comboBox27:setField("classe7"); obj.comboBox27:setHorzTextAlign("center"); obj.comboBox27:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox27:setValues({'1', '2', '3'}); obj.comboBox27:setName("comboBox27"); obj.label290 = GUI.fromHandle(_obj_newObject("label")); obj.label290:setParent(obj.layout54); obj.label290:setLeft(240); obj.label290:setTop(55); obj.label290:setWidth(50); obj.label290:setHeight(25); obj.label290:setText("Freq."); lfm_setPropAsString(obj.label290, "fontStyle", "bold"); obj.label290:setName("label290"); obj.edit338 = GUI.fromHandle(_obj_newObject("edit")); obj.edit338:setParent(obj.layout54); obj.edit338:setVertTextAlign("center"); obj.edit338:setLeft(282); obj.edit338:setTop(55); obj.edit338:setWidth(82); obj.edit338:setHeight(25); obj.edit338:setField("frequencia7"); obj.edit338:setName("edit338"); obj.label291 = GUI.fromHandle(_obj_newObject("label")); obj.label291:setParent(obj.layout54); obj.label291:setLeft(370); obj.label291:setTop(6); obj.label291:setWidth(70); obj.label291:setHeight(25); obj.label291:setText("Acurácia"); lfm_setPropAsString(obj.label291, "fontStyle", "bold"); obj.label291:setName("label291"); obj.edit339 = GUI.fromHandle(_obj_newObject("edit")); obj.edit339:setParent(obj.layout54); obj.edit339:setVertTextAlign("center"); obj.edit339:setLeft(425); obj.edit339:setTop(6); obj.edit339:setWidth(53); obj.edit339:setHeight(25); obj.edit339:setField("Acc7"); obj.edit339:setType("number"); obj.edit339:setName("edit339"); obj.label292 = GUI.fromHandle(_obj_newObject("label")); obj.label292:setParent(obj.layout54); obj.label292:setLeft(370); obj.label292:setTop(31); obj.label292:setWidth(70); obj.label292:setHeight(25); obj.label292:setText("Prec.Bôn."); lfm_setPropAsString(obj.label292, "fontStyle", "bold"); obj.label292:setName("label292"); obj.edit340 = GUI.fromHandle(_obj_newObject("edit")); obj.edit340:setParent(obj.layout54); obj.edit340:setVertTextAlign("center"); obj.edit340:setLeft(425); obj.edit340:setTop(31); obj.edit340:setWidth(53); obj.edit340:setHeight(25); obj.edit340:setField("ataque7"); obj.edit340:setType("number"); obj.edit340:setName("edit340"); obj.label293 = GUI.fromHandle(_obj_newObject("label")); obj.label293:setParent(obj.layout54); obj.label293:setLeft(370); obj.label293:setTop(55); obj.label293:setWidth(70); obj.label293:setHeight(25); obj.label293:setText("D. Base"); lfm_setPropAsString(obj.label293, "fontStyle", "bold"); obj.label293:setName("label293"); obj.edit341 = GUI.fromHandle(_obj_newObject("edit")); obj.edit341:setParent(obj.layout54); obj.edit341:setVertTextAlign("center"); obj.edit341:setLeft(425); obj.edit341:setTop(55); obj.edit341:setWidth(53); obj.edit341:setHeight(25); obj.edit341:setField("dano7"); obj.edit341:setName("edit341"); obj.button55 = GUI.fromHandle(_obj_newObject("button")); obj.button55:setParent(obj.layout54); obj.button55:setLeft(488); obj.button55:setTop(6); obj.button55:setWidth(82); obj.button55:setText("Acerto"); obj.button55:setFontSize(11); lfm_setPropAsString(obj.button55, "fontStyle", "bold"); obj.button55:setName("button55"); obj.button56 = GUI.fromHandle(_obj_newObject("button")); obj.button56:setParent(obj.layout54); obj.button56:setLeft(488); obj.button56:setTop(31); obj.button56:setWidth(82); obj.button56:setText("Dano"); obj.button56:setFontSize(11); lfm_setPropAsString(obj.button56, "fontStyle", "bold"); obj.button56:setName("button56"); obj.button57 = GUI.fromHandle(_obj_newObject("button")); obj.button57:setParent(obj.layout54); obj.button57:setLeft(488); obj.button57:setTop(55); obj.button57:setWidth(82); obj.button57:setText("Crítico"); obj.button57:setFontSize(11); lfm_setPropAsString(obj.button57, "fontStyle", "bold"); obj.button57:setName("button57"); obj.textEditor21 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor21:setParent(obj.layout54); obj.textEditor21:setLeft(575); obj.textEditor21:setTop(5); obj.textEditor21:setWidth(295); obj.textEditor21:setHeight(75); obj.textEditor21:setField("campoEfeitoGolpes7"); obj.textEditor21:setName("textEditor21"); obj.label294 = GUI.fromHandle(_obj_newObject("label")); obj.label294:setParent(obj.layout54); obj.label294:setLeft(875); obj.label294:setTop(5); obj.label294:setWidth(80); obj.label294:setHeight(25); obj.label294:setText("Aptidão"); lfm_setPropAsString(obj.label294, "fontStyle", "bold"); obj.label294:setName("label294"); obj.edit342 = GUI.fromHandle(_obj_newObject("edit")); obj.edit342:setParent(obj.layout54); obj.edit342:setVertTextAlign("center"); obj.edit342:setLeft(940); obj.edit342:setTop(5); obj.edit342:setWidth(120); obj.edit342:setHeight(25); obj.edit342:setField("tipoContest7"); obj.edit342:setName("edit342"); obj.label295 = GUI.fromHandle(_obj_newObject("label")); obj.label295:setParent(obj.layout54); obj.label295:setLeft(875); obj.label295:setTop(30); obj.label295:setWidth(80); obj.label295:setHeight(25); obj.label295:setText("Concursos"); lfm_setPropAsString(obj.label295, "fontStyle", "bold"); obj.label295:setName("label295"); obj.edit343 = GUI.fromHandle(_obj_newObject("edit")); obj.edit343:setParent(obj.layout54); obj.edit343:setVertTextAlign("center"); obj.edit343:setLeft(940); obj.edit343:setTop(30); obj.edit343:setWidth(120); obj.edit343:setHeight(25); obj.edit343:setField("efeitoContest7"); obj.edit343:setName("edit343"); obj.label296 = GUI.fromHandle(_obj_newObject("label")); obj.label296:setParent(obj.layout54); obj.label296:setLeft(875); obj.label296:setTop(55); obj.label296:setWidth(80); obj.label296:setHeight(25); obj.label296:setText("Bôn.Dano"); lfm_setPropAsString(obj.label296, "fontStyle", "bold"); obj.label296:setName("label296"); obj.edit344 = GUI.fromHandle(_obj_newObject("edit")); obj.edit344:setParent(obj.layout54); obj.edit344:setVertTextAlign("center"); obj.edit344:setLeft(940); obj.edit344:setTop(55); obj.edit344:setWidth(120); obj.edit344:setHeight(25); obj.edit344:setField("BDano7"); obj.edit344:setName("edit344"); obj.layout55 = GUI.fromHandle(_obj_newObject("layout")); obj.layout55:setParent(obj.layout47); obj.layout55:setLeft(2); obj.layout55:setTop(668); obj.layout55:setWidth(1207); obj.layout55:setHeight(92); obj.layout55:setName("layout55"); obj.rectangle68 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle68:setParent(obj.layout55); obj.rectangle68:setAlign("client"); obj.rectangle68:setColor("black"); obj.rectangle68:setName("rectangle68"); obj.label297 = GUI.fromHandle(_obj_newObject("label")); obj.label297:setParent(obj.layout55); obj.label297:setLeft(5); obj.label297:setTop(5); obj.label297:setWidth(70); obj.label297:setHeight(25); obj.label297:setText("Golpe"); lfm_setPropAsString(obj.label297, "fontStyle", "bold"); obj.label297:setName("label297"); obj.edit345 = GUI.fromHandle(_obj_newObject("edit")); obj.edit345:setParent(obj.layout55); obj.edit345:setVertTextAlign("center"); obj.edit345:setLeft(75); obj.edit345:setTop(5); obj.edit345:setWidth(160); obj.edit345:setHeight(25); obj.edit345:setField("golpe8"); obj.edit345:setName("edit345"); obj.label298 = GUI.fromHandle(_obj_newObject("label")); obj.label298:setParent(obj.layout55); obj.label298:setLeft(5); obj.label298:setTop(30); obj.label298:setWidth(80); obj.label298:setHeight(25); obj.label298:setText("Descritores"); lfm_setPropAsString(obj.label298, "fontStyle", "bold"); obj.label298:setName("label298"); obj.edit346 = GUI.fromHandle(_obj_newObject("edit")); obj.edit346:setParent(obj.layout55); obj.edit346:setVertTextAlign("center"); obj.edit346:setLeft(75); obj.edit346:setTop(30); obj.edit346:setWidth(160); obj.edit346:setHeight(25); obj.edit346:setField("Descritores8"); obj.edit346:setName("edit346"); obj.label299 = GUI.fromHandle(_obj_newObject("label")); obj.label299:setParent(obj.layout55); obj.label299:setLeft(5); obj.label299:setTop(55); obj.label299:setWidth(70); obj.label299:setHeight(25); obj.label299:setText("Alcance"); lfm_setPropAsString(obj.label299, "fontStyle", "bold"); obj.label299:setName("label299"); obj.edit347 = GUI.fromHandle(_obj_newObject("edit")); obj.edit347:setParent(obj.layout55); obj.edit347:setVertTextAlign("center"); obj.edit347:setLeft(75); obj.edit347:setTop(55); obj.edit347:setWidth(160); obj.edit347:setHeight(25); obj.edit347:setField("alcance8"); obj.edit347:setName("edit347"); obj.label300 = GUI.fromHandle(_obj_newObject("label")); obj.label300:setParent(obj.layout55); obj.label300:setLeft(240); obj.label300:setTop(6); obj.label300:setWidth(50); obj.label300:setHeight(25); obj.label300:setText("Tipo"); lfm_setPropAsString(obj.label300, "fontStyle", "bold"); obj.label300:setName("label300"); obj.edit348 = GUI.fromHandle(_obj_newObject("edit")); obj.edit348:setParent(obj.layout55); obj.edit348:setVertTextAlign("center"); obj.edit348:setLeft(282); obj.edit348:setTop(6); obj.edit348:setWidth(82); obj.edit348:setHeight(25); obj.edit348:setField("tipo8"); obj.edit348:setName("edit348"); obj.label301 = GUI.fromHandle(_obj_newObject("label")); obj.label301:setParent(obj.layout55); obj.label301:setLeft(240); obj.label301:setTop(31); obj.label301:setWidth(50); obj.label301:setHeight(25); obj.label301:setText("Classe"); lfm_setPropAsString(obj.label301, "fontStyle", "bold"); obj.label301:setName("label301"); obj.comboBox28 = GUI.fromHandle(_obj_newObject("comboBox")); obj.comboBox28:setParent(obj.layout55); obj.comboBox28:setLeft(282); obj.comboBox28:setTop(31); obj.comboBox28:setWidth(82); obj.comboBox28:setHeight(25); obj.comboBox28:setField("classe8"); obj.comboBox28:setHorzTextAlign("center"); obj.comboBox28:setItems({'Ataque', 'Especial', 'Efeito'}); obj.comboBox28:setValues({'1', '2', '3'}); obj.comboBox28:setName("comboBox28"); obj.label302 = GUI.fromHandle(_obj_newObject("label")); obj.label302:setParent(obj.layout55); obj.label302:setLeft(240); obj.label302:setTop(55); obj.label302:setWidth(50); obj.label302:setHeight(25); obj.label302:setText("Freq."); lfm_setPropAsString(obj.label302, "fontStyle", "bold"); obj.label302:setName("label302"); obj.edit349 = GUI.fromHandle(_obj_newObject("edit")); obj.edit349:setParent(obj.layout55); obj.edit349:setVertTextAlign("center"); obj.edit349:setLeft(282); obj.edit349:setTop(55); obj.edit349:setWidth(82); obj.edit349:setHeight(25); obj.edit349:setField("frequencia8"); obj.edit349:setName("edit349"); obj.label303 = GUI.fromHandle(_obj_newObject("label")); obj.label303:setParent(obj.layout55); obj.label303:setLeft(370); obj.label303:setTop(6); obj.label303:setWidth(70); obj.label303:setHeight(25); obj.label303:setText("Acurácia"); lfm_setPropAsString(obj.label303, "fontStyle", "bold"); obj.label303:setName("label303"); obj.edit350 = GUI.fromHandle(_obj_newObject("edit")); obj.edit350:setParent(obj.layout55); obj.edit350:setVertTextAlign("center"); obj.edit350:setLeft(425); obj.edit350:setTop(6); obj.edit350:setWidth(53); obj.edit350:setHeight(25); obj.edit350:setField("Acc8"); obj.edit350:setType("number"); obj.edit350:setName("edit350"); obj.label304 = GUI.fromHandle(_obj_newObject("label")); obj.label304:setParent(obj.layout55); obj.label304:setLeft(370); obj.label304:setTop(31); obj.label304:setWidth(70); obj.label304:setHeight(25); obj.label304:setText("Prec.Bôn."); lfm_setPropAsString(obj.label304, "fontStyle", "bold"); obj.label304:setName("label304"); obj.edit351 = GUI.fromHandle(_obj_newObject("edit")); obj.edit351:setParent(obj.layout55); obj.edit351:setVertTextAlign("center"); obj.edit351:setLeft(425); obj.edit351:setTop(31); obj.edit351:setWidth(53); obj.edit351:setHeight(25); obj.edit351:setField("ataque8"); obj.edit351:setType("number"); obj.edit351:setName("edit351"); obj.label305 = GUI.fromHandle(_obj_newObject("label")); obj.label305:setParent(obj.layout55); obj.label305:setLeft(370); obj.label305:setTop(55); obj.label305:setWidth(70); obj.label305:setHeight(25); obj.label305:setText("D. Base"); lfm_setPropAsString(obj.label305, "fontStyle", "bold"); obj.label305:setName("label305"); obj.edit352 = GUI.fromHandle(_obj_newObject("edit")); obj.edit352:setParent(obj.layout55); obj.edit352:setVertTextAlign("center"); obj.edit352:setLeft(425); obj.edit352:setTop(55); obj.edit352:setWidth(53); obj.edit352:setHeight(25); obj.edit352:setField("dano8"); obj.edit352:setName("edit352"); obj.button58 = GUI.fromHandle(_obj_newObject("button")); obj.button58:setParent(obj.layout55); obj.button58:setLeft(488); obj.button58:setTop(6); obj.button58:setWidth(82); obj.button58:setText("Acerto"); obj.button58:setFontSize(11); lfm_setPropAsString(obj.button58, "fontStyle", "bold"); obj.button58:setName("button58"); obj.button59 = GUI.fromHandle(_obj_newObject("button")); obj.button59:setParent(obj.layout55); obj.button59:setLeft(488); obj.button59:setTop(31); obj.button59:setWidth(82); obj.button59:setText("Dano"); obj.button59:setFontSize(11); lfm_setPropAsString(obj.button59, "fontStyle", "bold"); obj.button59:setName("button59"); obj.button60 = GUI.fromHandle(_obj_newObject("button")); obj.button60:setParent(obj.layout55); obj.button60:setLeft(488); obj.button60:setTop(55); obj.button60:setWidth(82); obj.button60:setText("Crítico"); obj.button60:setFontSize(11); lfm_setPropAsString(obj.button60, "fontStyle", "bold"); obj.button60:setName("button60"); obj.textEditor22 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor22:setParent(obj.layout55); obj.textEditor22:setLeft(575); obj.textEditor22:setTop(5); obj.textEditor22:setWidth(295); obj.textEditor22:setHeight(75); obj.textEditor22:setField("campoEfeitoGolpes8"); obj.textEditor22:setName("textEditor22"); obj.label306 = GUI.fromHandle(_obj_newObject("label")); obj.label306:setParent(obj.layout55); obj.label306:setLeft(875); obj.label306:setTop(5); obj.label306:setWidth(80); obj.label306:setHeight(25); obj.label306:setText("Aptidão"); lfm_setPropAsString(obj.label306, "fontStyle", "bold"); obj.label306:setName("label306"); obj.edit353 = GUI.fromHandle(_obj_newObject("edit")); obj.edit353:setParent(obj.layout55); obj.edit353:setVertTextAlign("center"); obj.edit353:setLeft(940); obj.edit353:setTop(5); obj.edit353:setWidth(120); obj.edit353:setHeight(25); obj.edit353:setField("tipoContest8"); obj.edit353:setName("edit353"); obj.label307 = GUI.fromHandle(_obj_newObject("label")); obj.label307:setParent(obj.layout55); obj.label307:setLeft(875); obj.label307:setTop(30); obj.label307:setWidth(80); obj.label307:setHeight(25); obj.label307:setText("Concursos"); lfm_setPropAsString(obj.label307, "fontStyle", "bold"); obj.label307:setName("label307"); obj.edit354 = GUI.fromHandle(_obj_newObject("edit")); obj.edit354:setParent(obj.layout55); obj.edit354:setVertTextAlign("center"); obj.edit354:setLeft(940); obj.edit354:setTop(30); obj.edit354:setWidth(120); obj.edit354:setHeight(25); obj.edit354:setField("efeitoContest8"); obj.edit354:setName("edit354"); obj.label308 = GUI.fromHandle(_obj_newObject("label")); obj.label308:setParent(obj.layout55); obj.label308:setLeft(875); obj.label308:setTop(55); obj.label308:setWidth(80); obj.label308:setHeight(25); obj.label308:setText("Bôn.Dano"); lfm_setPropAsString(obj.label308, "fontStyle", "bold"); obj.label308:setName("label308"); obj.edit355 = GUI.fromHandle(_obj_newObject("edit")); obj.edit355:setParent(obj.layout55); obj.edit355:setVertTextAlign("center"); obj.edit355:setLeft(940); obj.edit355:setTop(55); obj.edit355:setWidth(120); obj.edit355:setHeight(25); obj.edit355:setField("BDano8"); obj.edit355:setName("edit355"); obj.tab9 = GUI.fromHandle(_obj_newObject("tab")); obj.tab9:setParent(obj.tabControl1); obj.tab9:setTitle("Mochila"); obj.tab9:setName("tab9"); obj.frmMochilaB = GUI.fromHandle(_obj_newObject("form")); obj.frmMochilaB:setParent(obj.tab9); obj.frmMochilaB:setName("frmMochilaB"); obj.frmMochilaB:setAlign("client"); obj.frmMochilaB:setTheme("dark"); obj.frmMochilaB:setMargins({top=1}); obj.popItem = GUI.fromHandle(_obj_newObject("popup")); obj.popItem:setParent(obj.frmMochilaB); obj.popItem:setName("popItem"); obj.popItem:setWidth(300); obj.popItem:setHeight(250); obj.popItem:setBackOpacity(0.4); lfm_setPropAsString(obj.popItem, "autoScopeNode", "false"); obj.flowLayout2 = GUI.fromHandle(_obj_newObject("flowLayout")); obj.flowLayout2:setParent(obj.popItem); obj.flowLayout2:setAlign("top"); obj.flowLayout2:setAutoHeight(true); obj.flowLayout2:setMaxControlsPerLine(3); obj.flowLayout2:setMargins({bottom=4}); obj.flowLayout2:setHorzAlign("center"); obj.flowLayout2:setName("flowLayout2"); obj.flowPart7 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart7:setParent(obj.flowLayout2); obj.flowPart7:setMinWidth(90); obj.flowPart7:setMaxWidth(150); obj.flowPart7:setHeight(35); obj.flowPart7:setName("flowPart7"); obj.label309 = GUI.fromHandle(_obj_newObject("label")); obj.label309:setParent(obj.flowPart7); obj.label309:setAlign("top"); obj.label309:setFontSize(10); obj.label309:setText("Nome"); obj.label309:setHorzTextAlign("center"); obj.label309:setWordWrap(true); obj.label309:setTextTrimming("none"); obj.label309:setAutoSize(true); obj.label309:setHint(""); obj.label309:setHitTest(true); obj.label309:setName("label309"); obj.edit356 = GUI.fromHandle(_obj_newObject("edit")); obj.edit356:setParent(obj.flowPart7); obj.edit356:setAlign("client"); obj.edit356:setField("nome"); obj.edit356:setFontSize(12); obj.edit356:setName("edit356"); obj.flowPart8 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart8:setParent(obj.flowLayout2); obj.flowPart8:setMinWidth(90); obj.flowPart8:setMaxWidth(150); obj.flowPart8:setHeight(35); obj.flowPart8:setName("flowPart8"); obj.label310 = GUI.fromHandle(_obj_newObject("label")); obj.label310:setParent(obj.flowPart8); obj.label310:setAlign("top"); obj.label310:setFontSize(10); obj.label310:setText("Preço"); obj.label310:setHorzTextAlign("center"); obj.label310:setWordWrap(true); obj.label310:setTextTrimming("none"); obj.label310:setAutoSize(true); obj.label310:setHint(""); obj.label310:setHitTest(true); obj.label310:setName("label310"); obj.edit357 = GUI.fromHandle(_obj_newObject("edit")); obj.edit357:setParent(obj.flowPart8); obj.edit357:setAlign("client"); obj.edit357:setField("preco"); obj.edit357:setFontSize(12); obj.edit357:setType("number"); obj.edit357:setName("edit357"); obj.flowPart9 = GUI.fromHandle(_obj_newObject("flowPart")); obj.flowPart9:setParent(obj.flowLayout2); obj.flowPart9:setMinWidth(90); obj.flowPart9:setMaxWidth(150); obj.flowPart9:setHeight(35); obj.flowPart9:setName("flowPart9"); obj.label311 = GUI.fromHandle(_obj_newObject("label")); obj.label311:setParent(obj.flowPart9); obj.label311:setAlign("top"); obj.label311:setFontSize(10); obj.label311:setText("Rolagem"); obj.label311:setHorzTextAlign("center"); obj.label311:setWordWrap(true); obj.label311:setTextTrimming("none"); obj.label311:setAutoSize(true); obj.label311:setHint("Se usar o item envolver dados, colocar a rolagem"); obj.label311:setHitTest(true); obj.label311:setName("label311"); obj.edit358 = GUI.fromHandle(_obj_newObject("edit")); obj.edit358:setParent(obj.flowPart9); obj.edit358:setAlign("client"); obj.edit358:setField("Roll"); obj.edit358:setFontSize(12); obj.edit358:setName("edit358"); obj.textEditor23 = GUI.fromHandle(_obj_newObject("textEditor")); obj.textEditor23:setParent(obj.popItem); obj.textEditor23:setAlign("client"); obj.textEditor23:setField("descricao"); obj.textEditor23:setName("textEditor23"); obj.layout56 = GUI.fromHandle(_obj_newObject("layout")); obj.layout56:setParent(obj.frmMochilaB); obj.layout56:setLeft(000); obj.layout56:setTop(000); obj.layout56:setHeight(650); obj.layout56:setWidth(1100); obj.layout56:setName("layout56"); obj.image54 = GUI.fromHandle(_obj_newObject("image")); obj.image54:setParent(obj.layout56); obj.image54:setLeft(000); obj.image54:setTop(000); obj.image54:setHeight(650); obj.image54:setWidth(1100); obj.image54:setSRC("/img/Pokeball.jpg"); obj.image54:setStyle("autoFit"); obj.image54:setName("image54"); obj.layout57 = GUI.fromHandle(_obj_newObject("layout")); obj.layout57:setParent(obj.frmMochilaB); obj.layout57:setLeft(30); obj.layout57:setTop(10); obj.layout57:setWidth(315); obj.layout57:setHeight(300); obj.layout57:setName("layout57"); obj.rectangle69 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle69:setParent(obj.layout57); obj.rectangle69:setAlign("client"); obj.rectangle69:setColor("#0000007F"); obj.rectangle69:setStrokeColor("black"); obj.rectangle69:setStrokeSize(1); obj.rectangle69:setName("rectangle69"); obj.button61 = GUI.fromHandle(_obj_newObject("button")); obj.button61:setParent(obj.layout57); obj.button61:setLeft(5); obj.button61:setTop(5); obj.button61:setHeight(20); obj.button61:setWidth(305); obj.button61:setText("Itens Medicinais"); obj.button61:setName("button61"); obj.rclConsumiveis = GUI.fromHandle(_obj_newObject("recordList")); obj.rclConsumiveis:setParent(obj.layout57); obj.rclConsumiveis:setLeft(5); obj.rclConsumiveis:setTop(30); obj.rclConsumiveis:setWidth(305); obj.rclConsumiveis:setHeight(263); obj.rclConsumiveis:setName("rclConsumiveis"); obj.rclConsumiveis:setField("itensConsumiveis"); obj.rclConsumiveis:setTemplateForm("frmConsumiveis"); obj.layout58 = GUI.fromHandle(_obj_newObject("layout")); obj.layout58:setParent(obj.frmMochilaB); obj.layout58:setLeft(380); obj.layout58:setTop(10); obj.layout58:setWidth(315); obj.layout58:setHeight(300); obj.layout58:setName("layout58"); obj.rectangle70 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle70:setParent(obj.layout58); obj.rectangle70:setAlign("client"); obj.rectangle70:setColor("#0000007F"); obj.rectangle70:setStrokeColor("black"); obj.rectangle70:setStrokeSize(1); obj.rectangle70:setName("rectangle70"); obj.button62 = GUI.fromHandle(_obj_newObject("button")); obj.button62:setParent(obj.layout58); obj.button62:setLeft(5); obj.button62:setTop(5); obj.button62:setHeight(20); obj.button62:setWidth(305); obj.button62:setText("Pokébolas"); obj.button62:setName("button62"); obj.rclItens2 = GUI.fromHandle(_obj_newObject("recordList")); obj.rclItens2:setParent(obj.layout58); obj.rclItens2:setLeft(5); obj.rclItens2:setTop(30); obj.rclItens2:setWidth(305); obj.rclItens2:setHeight(263); obj.rclItens2:setName("rclItens2"); obj.rclItens2:setField("itens2"); obj.rclItens2:setTemplateForm("frmConsumiveis"); obj.layout59 = GUI.fromHandle(_obj_newObject("layout")); obj.layout59:setParent(obj.frmMochilaB); obj.layout59:setLeft(730); obj.layout59:setTop(10); obj.layout59:setWidth(315); obj.layout59:setHeight(300); obj.layout59:setName("layout59"); obj.rectangle71 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle71:setParent(obj.layout59); obj.rectangle71:setAlign("client"); obj.rectangle71:setColor("#0000007F"); obj.rectangle71:setStrokeColor("black"); obj.rectangle71:setStrokeSize(1); obj.rectangle71:setName("rectangle71"); obj.button63 = GUI.fromHandle(_obj_newObject("button")); obj.button63:setParent(obj.layout59); obj.button63:setLeft(5); obj.button63:setTop(5); obj.button63:setHeight(20); obj.button63:setWidth(305); obj.button63:setText("Abricós e Frutas"); obj.button63:setName("button63"); obj.rclItens3 = GUI.fromHandle(_obj_newObject("recordList")); obj.rclItens3:setParent(obj.layout59); obj.rclItens3:setLeft(5); obj.rclItens3:setTop(30); obj.rclItens3:setWidth(305); obj.rclItens3:setHeight(263); obj.rclItens3:setName("rclItens3"); obj.rclItens3:setField("itens3"); obj.rclItens3:setTemplateForm("frmConsumiveis"); obj.layout60 = GUI.fromHandle(_obj_newObject("layout")); obj.layout60:setParent(obj.frmMochilaB); obj.layout60:setLeft(30); obj.layout60:setTop(310); obj.layout60:setWidth(315); obj.layout60:setHeight(300); obj.layout60:setName("layout60"); obj.rectangle72 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle72:setParent(obj.layout60); obj.rectangle72:setAlign("client"); obj.rectangle72:setColor("#0000007F"); obj.rectangle72:setStrokeColor("black"); obj.rectangle72:setStrokeSize(1); obj.rectangle72:setName("rectangle72"); obj.button64 = GUI.fromHandle(_obj_newObject("button")); obj.button64:setParent(obj.layout60); obj.button64:setLeft(5); obj.button64:setTop(5); obj.button64:setHeight(20); obj.button64:setWidth(305); obj.button64:setText("Itens Pokémons (Mantidos, Pedras e Registros)"); obj.button64:setName("button64"); obj.rclItens4 = GUI.fromHandle(_obj_newObject("recordList")); obj.rclItens4:setParent(obj.layout60); obj.rclItens4:setLeft(5); obj.rclItens4:setTop(30); obj.rclItens4:setWidth(305); obj.rclItens4:setHeight(263); obj.rclItens4:setName("rclItens4"); obj.rclItens4:setField("itens4"); obj.rclItens4:setTemplateForm("frmConsumiveis"); obj.layout61 = GUI.fromHandle(_obj_newObject("layout")); obj.layout61:setParent(obj.frmMochilaB); obj.layout61:setLeft(380); obj.layout61:setTop(310); obj.layout61:setWidth(315); obj.layout61:setHeight(300); obj.layout61:setName("layout61"); obj.rectangle73 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle73:setParent(obj.layout61); obj.rectangle73:setAlign("client"); obj.rectangle73:setColor("#0000007F"); obj.rectangle73:setStrokeColor("black"); obj.rectangle73:setStrokeSize(1); obj.rectangle73:setName("rectangle73"); obj.button65 = GUI.fromHandle(_obj_newObject("button")); obj.button65:setParent(obj.layout61); obj.button65:setLeft(5); obj.button65:setTop(5); obj.button65:setHeight(20); obj.button65:setWidth(305); obj.button65:setText("Itens, Itens Mágicos e Repelentes"); obj.button65:setName("button65"); obj.rclItens5 = GUI.fromHandle(_obj_newObject("recordList")); obj.rclItens5:setParent(obj.layout61); obj.rclItens5:setLeft(5); obj.rclItens5:setTop(30); obj.rclItens5:setWidth(305); obj.rclItens5:setHeight(263); obj.rclItens5:setName("rclItens5"); obj.rclItens5:setField("itens5"); obj.rclItens5:setTemplateForm("frmConsumiveis"); obj.layout62 = GUI.fromHandle(_obj_newObject("layout")); obj.layout62:setParent(obj.frmMochilaB); obj.layout62:setLeft(730); obj.layout62:setTop(310); obj.layout62:setWidth(315); obj.layout62:setHeight(300); obj.layout62:setName("layout62"); obj.rectangle74 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle74:setParent(obj.layout62); obj.rectangle74:setAlign("client"); obj.rectangle74:setColor("#0000007F"); obj.rectangle74:setStrokeColor("black"); obj.rectangle74:setStrokeSize(1); obj.rectangle74:setName("rectangle74"); obj.button66 = GUI.fromHandle(_obj_newObject("button")); obj.button66:setParent(obj.layout62); obj.button66:setLeft(5); obj.button66:setTop(5); obj.button66:setHeight(20); obj.button66:setWidth(305); obj.button66:setText("Itens-Chave"); obj.button66:setName("button66"); obj.rclItens6 = GUI.fromHandle(_obj_newObject("recordList")); obj.rclItens6:setParent(obj.layout62); obj.rclItens6:setLeft(5); obj.rclItens6:setTop(30); obj.rclItens6:setWidth(305); obj.rclItens6:setHeight(263); obj.rclItens6:setName("rclItens6"); obj.rclItens6:setField("itens6"); obj.rclItens6:setTemplateForm("frmConsumiveis"); obj.tab10 = GUI.fromHandle(_obj_newObject("tab")); obj.tab10:setParent(obj.tabControl1); obj.tab10:setTitle("Pokédex"); obj.tab10:setName("tab10"); obj.frmPokedex = GUI.fromHandle(_obj_newObject("form")); obj.frmPokedex:setParent(obj.tab10); obj.frmPokedex:setName("frmPokedex"); obj.frmPokedex:setAlign("client"); obj.frmPokedex:setTheme("dark"); obj.frmPokedex:setMargins({top=1}); obj.layout63 = GUI.fromHandle(_obj_newObject("layout")); obj.layout63:setParent(obj.frmPokedex); obj.layout63:setLeft(000); obj.layout63:setTop(000); obj.layout63:setHeight(650); obj.layout63:setWidth(1100); obj.layout63:setName("layout63"); obj.image55 = GUI.fromHandle(_obj_newObject("image")); obj.image55:setParent(obj.layout63); obj.image55:setLeft(000); obj.image55:setTop(000); obj.image55:setHeight(650); obj.image55:setWidth(1100); obj.image55:setSRC("/img/Pokeball.jpg"); obj.image55:setStyle("autoFit"); obj.image55:setName("image55"); obj.button67 = GUI.fromHandle(_obj_newObject("button")); obj.button67:setParent(obj.frmPokedex); obj.button67:setAlign("top"); obj.button67:setHeight(25); obj.button67:setText("Adicionar Entrada"); obj.button67:setName("button67"); obj.layout64 = GUI.fromHandle(_obj_newObject("layout")); obj.layout64:setParent(obj.frmPokedex); obj.layout64:setAlign("top"); obj.layout64:setWidth(170); obj.layout64:setHeight(30); obj.layout64:setMargins({top=5, bottom=5, left=15}); obj.layout64:setName("layout64"); obj.label312 = GUI.fromHandle(_obj_newObject("label")); obj.label312:setParent(obj.layout64); obj.label312:setText("Capturados:"); obj.label312:setAlign("left"); obj.label312:setWidth(80); obj.label312:setName("label312"); obj.rectangle75 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle75:setParent(obj.layout64); obj.rectangle75:setColor("darkred"); obj.rectangle75:setAlign("left"); obj.rectangle75:setMargins({left=5}); obj.rectangle75:setName("rectangle75"); obj.label313 = GUI.fromHandle(_obj_newObject("label")); obj.label313:setParent(obj.rectangle75); obj.label313:setField("trainerPokeCaught"); obj.label313:setAlign("client"); obj.label313:setHorzTextAlign("center"); obj.label313:setName("label313"); obj.label314 = GUI.fromHandle(_obj_newObject("label")); obj.label314:setParent(obj.layout64); obj.label314:setText("Vistos:"); obj.label314:setAlign("left"); obj.label314:setWidth(80); obj.label314:setMargins({left=80}); obj.label314:setName("label314"); obj.rectangle76 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle76:setParent(obj.layout64); obj.rectangle76:setColor("darkred"); obj.rectangle76:setAlign("left"); obj.rectangle76:setMargins({left=10}); obj.rectangle76:setName("rectangle76"); obj.label315 = GUI.fromHandle(_obj_newObject("label")); obj.label315:setParent(obj.rectangle76); obj.label315:setField("trainerPokeSeen"); obj.label315:setAlign("client"); obj.label315:setHorzTextAlign("center"); obj.label315:setName("label315"); obj.layout65 = GUI.fromHandle(_obj_newObject("layout")); obj.layout65:setParent(obj.frmPokedex); obj.layout65:setAlign("client"); obj.layout65:setTop(35); obj.layout65:setName("layout65"); obj.scrollBox5 = GUI.fromHandle(_obj_newObject("scrollBox")); obj.scrollBox5:setParent(obj.layout65); obj.scrollBox5:setMargins({top=5}); obj.scrollBox5:setAlign("client"); obj.scrollBox5:setName("scrollBox5"); obj.rclDex = GUI.fromHandle(_obj_newObject("recordList")); obj.rclDex:setParent(obj.scrollBox5); obj.rclDex:setName("rclDex"); obj.rclDex:setField("recDex"); obj.rclDex:setTemplateForm("frmDex"); obj.rclDex:setAlign("client"); obj.rclDex:setLayout("horizontalTiles"); obj.rclDex:setMinQt(1); obj.rclDex:setSelectable(true); function self.recalcDex() if sheet ~= nil then local pokeSeenTotal = 0; local pokeCaughtTotal = 0; local nodes = NDB.getChildNodes(sheet.recDex); for i=1, #nodes, 1 do pokeSeenTotal = pokeSeenTotal + 1; if nodes[i].pokeCaught then pokeCaughtTotal = pokeCaughtTotal +1; end end sheet.trainerPokeSeen = pokeSeenTotal; sheet.trainerPokeCaught = pokeCaughtTotal; for i=1, #nodes, 1 do if (nodes[i].pokeNumber == nil) then nodes[i].urlDexNum = 0; elseif (string.len(nodes[i].pokeNumber) == 2) then nodes[i].urlDexNum = "0" .. nodes[i].pokeNumber; elseif (string.len(nodes[i].pokeNumber) == 3) then nodes[i].urlDexNum = nodes[i].pokeNumber; elseif (string.len(nodes[i].pokeNumber) == 1) then nodes[i].urlDexNum = "00" .. nodes[i].pokeNumber; end; nodes[i].pokeImgUrl = "https://www.serebii.net/xy/pokemon/" .. nodes[i].urlDexNum .. ".png"; end end; end obj.tab11 = GUI.fromHandle(_obj_newObject("tab")); obj.tab11:setParent(obj.tabControl1); obj.tab11:setTitle("Background"); obj.tab11:setName("tab11"); obj.frmBackground = GUI.fromHandle(_obj_newObject("form")); obj.frmBackground:setParent(obj.tab11); obj.frmBackground:setName("frmBackground"); obj.frmBackground:setAlign("client"); obj.frmBackground:setTheme("dark"); obj.frmBackground:setMargins({top=1}); obj.layout66 = GUI.fromHandle(_obj_newObject("layout")); obj.layout66:setParent(obj.frmBackground); obj.layout66:setLeft(000); obj.layout66:setTop(000); obj.layout66:setHeight(650); obj.layout66:setWidth(1100); obj.layout66:setName("layout66"); obj.image56 = GUI.fromHandle(_obj_newObject("image")); obj.image56:setParent(obj.layout66); obj.image56:setLeft(000); obj.image56:setTop(000); obj.image56:setHeight(650); obj.image56:setWidth(1100); obj.image56:setSRC("/img/Pokeball.jpg"); obj.image56:setStyle("autoFit"); obj.image56:setName("image56"); obj.layout67 = GUI.fromHandle(_obj_newObject("layout")); obj.layout67:setParent(obj.frmBackground); obj.layout67:setLeft(10); obj.layout67:setTop(10); obj.layout67:setHeight(800); obj.layout67:setWidth(1000); obj.layout67:setName("layout67"); obj.rectangle77 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle77:setParent(obj.layout67); obj.rectangle77:setLeft(000); obj.rectangle77:setTop(000); obj.rectangle77:setWidth(710); obj.rectangle77:setHeight(575); obj.rectangle77:setColor("darkred"); obj.rectangle77:setStrokeColor("black"); obj.rectangle77:setStrokeSize(5); obj.rectangle77:setName("rectangle77"); obj.label316 = GUI.fromHandle(_obj_newObject("label")); obj.label316:setParent(obj.layout67); obj.label316:setLeft(000); obj.label316:setTop(005); obj.label316:setHeight(20); obj.label316:setWidth(700); obj.label316:setFontColor("White"); obj.label316:setFontSize(18); obj.label316:setText("História"); obj.label316:setAutoSize(true); obj.label316:setHorzTextAlign("center"); obj.label316:setName("label316"); obj.richEdit1 = GUI.fromHandle(_obj_newObject("richEdit")); obj.richEdit1:setParent(obj.layout67); obj.richEdit1:setLeft(005); obj.richEdit1:setTop(030); obj.richEdit1:setWidth(700); obj.richEdit1:setHeight(540); lfm_setPropAsString(obj.richEdit1, "backgroundColor", "black"); lfm_setPropAsString(obj.richEdit1, "defaultFontColor", "white"); obj.richEdit1:setField("campoHistoria"); obj.richEdit1:setName("richEdit1"); obj.layout68 = GUI.fromHandle(_obj_newObject("layout")); obj.layout68:setParent(obj.frmBackground); obj.layout68:setLeft(740); obj.layout68:setTop(10); obj.layout68:setHeight(600); obj.layout68:setWidth(1000); obj.layout68:setName("layout68"); obj.rectangle78 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle78:setParent(obj.layout68); obj.rectangle78:setLeft(000); obj.rectangle78:setTop(000); obj.rectangle78:setWidth(340); obj.rectangle78:setHeight(435); obj.rectangle78:setColor("darkred"); obj.rectangle78:setStrokeColor("black"); obj.rectangle78:setStrokeSize(5); obj.rectangle78:setName("rectangle78"); obj.label317 = GUI.fromHandle(_obj_newObject("label")); obj.label317:setParent(obj.layout68); obj.label317:setLeft(000); obj.label317:setTop(005); obj.label317:setHeight(20); obj.label317:setWidth(330); obj.label317:setFontColor("White"); obj.label317:setFontSize(18); obj.label317:setText("Personalidade"); obj.label317:setAutoSize(true); obj.label317:setHorzTextAlign("center"); obj.label317:setName("label317"); obj.richEdit2 = GUI.fromHandle(_obj_newObject("richEdit")); obj.richEdit2:setParent(obj.layout68); obj.richEdit2:setLeft(005); obj.richEdit2:setTop(030); obj.richEdit2:setWidth(330); obj.richEdit2:setHeight(400); lfm_setPropAsString(obj.richEdit2, "backgroundColor", "black"); lfm_setPropAsString(obj.richEdit2, "defaultFontColor", "white"); obj.richEdit2:setField("campoPersonalidade"); obj.richEdit2:setName("richEdit2"); obj.tab12 = GUI.fromHandle(_obj_newObject("tab")); obj.tab12:setParent(obj.tabControl1); obj.tab12:setTitle("Anotações"); obj.tab12:setName("tab12"); obj.frmAnotacoes = GUI.fromHandle(_obj_newObject("form")); obj.frmAnotacoes:setParent(obj.tab12); obj.frmAnotacoes:setName("frmAnotacoes"); obj.frmAnotacoes:setAlign("client"); obj.frmAnotacoes:setTheme("dark"); obj.frmAnotacoes:setMargins({top=1}); obj.layout69 = GUI.fromHandle(_obj_newObject("layout")); obj.layout69:setParent(obj.frmAnotacoes); obj.layout69:setLeft(000); obj.layout69:setTop(000); obj.layout69:setHeight(650); obj.layout69:setWidth(1100); obj.layout69:setName("layout69"); obj.image57 = GUI.fromHandle(_obj_newObject("image")); obj.image57:setParent(obj.layout69); obj.image57:setLeft(000); obj.image57:setTop(000); obj.image57:setHeight(650); obj.image57:setWidth(1100); obj.image57:setSRC("/img/Pokeball.jpg"); obj.image57:setStyle("autoFit"); obj.image57:setName("image57"); obj.layout70 = GUI.fromHandle(_obj_newObject("layout")); obj.layout70:setParent(obj.frmAnotacoes); obj.layout70:setLeft(10); obj.layout70:setTop(10); obj.layout70:setHeight(600); obj.layout70:setWidth(500); obj.layout70:setName("layout70"); obj.rectangle79 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle79:setParent(obj.layout70); obj.rectangle79:setLeft(000); obj.rectangle79:setTop(000); obj.rectangle79:setWidth(495); obj.rectangle79:setHeight(580); obj.rectangle79:setColor("Red"); obj.rectangle79:setStrokeColor("black"); obj.rectangle79:setStrokeSize(5); obj.rectangle79:setName("rectangle79"); obj.richEdit3 = GUI.fromHandle(_obj_newObject("richEdit")); obj.richEdit3:setParent(obj.layout70); obj.richEdit3:setLeft(005); obj.richEdit3:setTop(005); obj.richEdit3:setWidth(485); obj.richEdit3:setHeight(570); lfm_setPropAsString(obj.richEdit3, "backgroundColor", "black"); lfm_setPropAsString(obj.richEdit3, "defaultFontColor", "white"); obj.richEdit3:setField("campoTextoGrande"); obj.richEdit3:setName("richEdit3"); obj.layout71 = GUI.fromHandle(_obj_newObject("layout")); obj.layout71:setParent(obj.frmAnotacoes); obj.layout71:setLeft(550); obj.layout71:setTop(10); obj.layout71:setHeight(600); obj.layout71:setWidth(500); obj.layout71:setName("layout71"); obj.rectangle80 = GUI.fromHandle(_obj_newObject("rectangle")); obj.rectangle80:setParent(obj.layout71); obj.rectangle80:setLeft(000); obj.rectangle80:setTop(000); obj.rectangle80:setWidth(495); obj.rectangle80:setHeight(580); obj.rectangle80:setColor("Red"); obj.rectangle80:setStrokeColor("black"); obj.rectangle80:setStrokeSize(5); obj.rectangle80:setName("rectangle80"); obj.richEdit4 = GUI.fromHandle(_obj_newObject("richEdit")); obj.richEdit4:setParent(obj.layout71); obj.richEdit4:setLeft(005); obj.richEdit4:setTop(005); obj.richEdit4:setWidth(485); obj.richEdit4:setHeight(570); lfm_setPropAsString(obj.richEdit4, "backgroundColor", "black"); lfm_setPropAsString(obj.richEdit4, "defaultFontColor", "white"); obj.richEdit4:setField("campoTextoGrande2"); obj.richEdit4:setName("richEdit4"); obj.tab13 = GUI.fromHandle(_obj_newObject("tab")); obj.tab13:setParent(obj.tabControl1); obj.tab13:setTitle("Créditos"); obj.tab13:setName("tab13"); obj.frmCreditos = GUI.fromHandle(_obj_newObject("form")); obj.frmCreditos:setParent(obj.tab13); obj.frmCreditos:setName("frmCreditos"); obj.frmCreditos:setAlign("client"); obj.frmCreditos:setTheme("dark"); obj.frmCreditos:setMargins({top=1}); obj.layout72 = GUI.fromHandle(_obj_newObject("layout")); obj.layout72:setParent(obj.frmCreditos); obj.layout72:setLeft(000); obj.layout72:setTop(000); obj.layout72:setHeight(650); obj.layout72:setWidth(1100); obj.layout72:setName("layout72"); obj.image58 = GUI.fromHandle(_obj_newObject("image")); obj.image58:setParent(obj.layout72); obj.image58:setLeft(000); obj.image58:setTop(000); obj.image58:setHeight(650); obj.image58:setWidth(1100); obj.image58:setSRC("/img/Pokeball.jpg"); obj.image58:setStyle("autoFit"); obj.image58:setName("image58"); obj.layout73 = GUI.fromHandle(_obj_newObject("layout")); obj.layout73:setParent(obj.frmCreditos); obj.layout73:setLeft(400); obj.layout73:setTop(200); obj.layout73:setHeight(600); obj.layout73:setWidth(465); obj.layout73:setName("layout73"); obj.label318 = GUI.fromHandle(_obj_newObject("label")); obj.label318:setParent(obj.layout73); obj.label318:setLeft(0); obj.label318:setTop(000); obj.label318:setHeight(20); obj.label318:setWidth(600); obj.label318:setText("Hitoshura (Criador do Plugin)"); obj.label318:setAutoSize(true); obj.label318:setName("label318"); obj.label319 = GUI.fromHandle(_obj_newObject("label")); obj.label319:setParent(obj.layout73); obj.label319:setLeft(0); obj.label319:setTop(025); obj.label319:setHeight(20); obj.label319:setWidth(600); obj.label319:setText("Shakerskj (Aba pokedéx)"); obj.label319:setAutoSize(true); obj.label319:setName("label319"); obj.label320 = GUI.fromHandle(_obj_newObject("label")); obj.label320:setParent(obj.layout73); obj.label320:setLeft(0); obj.label320:setTop(050); obj.label320:setHeight(20); obj.label320:setWidth(600); obj.label320:setText("Dragontail (Testes e sugestões)"); obj.label320:setAutoSize(true); obj.label320:setName("label320"); obj.label321 = GUI.fromHandle(_obj_newObject("label")); obj.label321:setParent(obj.layout73); obj.label321:setLeft(0); obj.label321:setTop(075); obj.label321:setHeight(20); obj.label321:setWidth(600); obj.label321:setText("Ambesek (Ajudou BASTANTE no Código)"); obj.label321:setAutoSize(true); obj.label321:setName("label321"); obj.label322 = GUI.fromHandle(_obj_newObject("label")); obj.label322:setParent(obj.layout73); obj.label322:setLeft(0); obj.label322:setTop(100); obj.label322:setHeight(20); obj.label322:setWidth(600); obj.label322:setText("Mia (Ajudou no código)"); obj.label322:setAutoSize(true); obj.label322:setName("label322"); obj.label323 = GUI.fromHandle(_obj_newObject("label")); obj.label323:setParent(obj.layout73); obj.label323:setLeft(0); obj.label323:setTop(125); obj.label323:setHeight(20); obj.label323:setWidth(600); obj.label323:setText("Bloody (Ajudou no código)"); obj.label323:setAutoSize(true); obj.label323:setName("label323"); obj.label324 = GUI.fromHandle(_obj_newObject("label")); obj.label324:setParent(obj.layout73); obj.label324:setLeft(0); obj.label324:setTop(150); obj.label324:setHeight(20); obj.label324:setWidth(600); obj.label324:setText("Webrian (Dicas e sugestões)"); obj.label324:setAutoSize(true); obj.label324:setName("label324"); obj.label325 = GUI.fromHandle(_obj_newObject("label")); obj.label325:setParent(obj.layout73); obj.label325:setLeft(0); obj.label325:setTop(175); obj.label325:setHeight(20); obj.label325:setWidth(600); obj.label325:setText("Lucasedu19 (Dicas e sugestões)"); obj.label325:setAutoSize(true); obj.label325:setName("label325"); obj._e_event0 = obj.BotaoFOR:addEventListener("onClick", function (_) if sheet == nil then return end; local NomeAtt = "Força" or "Atributo" local AttTot = tonumber(sheet.modFOR) or 0 local Teste = math.random(1,20); local Teste2 = Teste + AttTot; local mesa = Firecast.getMesaDe(sheet); mesa.activeChat:enviarMensagem("Total de [§B]" .. NomeAtt .. "[§B]: " .. Teste2 .. " [[§i]Dado:[§i] " .. Teste .. "]") end, obj); obj._e_event1 = obj.BotaoCON:addEventListener("onClick", function (_) if sheet == nil then return end; local NomeAtt = "Constituição" or "Atributo" local AttTot = tonumber(sheet.modCON) or 0 local Teste = math.random(1,20); local Teste2 = Teste + AttTot; local mesa = Firecast.getMesaDe(sheet); mesa.activeChat:enviarMensagem("Total de [§B]" .. NomeAtt .. "[§B]: " .. Teste2 .. " [[§i]Dado:[§i] " .. Teste .. "]") end, obj); obj._e_event2 = obj.BotaoDES:addEventListener("onClick", function (_) if sheet == nil then return end; local NomeAtt = "Destreza" or "Atributo" local AttTot = tonumber(sheet.modDES) or 0 local Teste = math.random(1,20); local Teste2 = Teste + AttTot; local mesa = Firecast.getMesaDe(sheet); mesa.activeChat:enviarMensagem("Total de [§B]" .. NomeAtt .. "[§B]: " .. Teste2 .. " [[§i]Dado:[§i] " .. Teste .. "]") end, obj); obj._e_event3 = obj.BotaoINT:addEventListener("onClick", function (_) if sheet == nil then return end; local NomeAtt = "Inteligência" or "Atributo" local AttTot = tonumber(sheet.modINT) or 0 local Teste = math.random(1,20); local Teste2 = Teste + AttTot; local mesa = Firecast.getMesaDe(sheet); mesa.activeChat:enviarMensagem("Total de [§B]" .. NomeAtt .. "[§B]: " .. Teste2 .. " [[§i]Dado:[§i] " .. Teste .. "]") end, obj); obj._e_event4 = obj.BotaoSAB:addEventListener("onClick", function (_) if sheet == nil then return end; local NomeAtt = "Sabedoria" or "Atributo" local AttTot = tonumber(sheet.modSAB) or 0 local Teste = math.random(1,20); local Teste2 = Teste + AttTot; local mesa = Firecast.getMesaDe(sheet); mesa.activeChat:enviarMensagem("Total de [§B]" .. NomeAtt .. "[§B]: " .. Teste2 .. " [[§i]Dado:[§i] " .. Teste .. "]") end, obj); obj._e_event5 = obj.BotaoCAR:addEventListener("onClick", function (_) if sheet == nil then return end; local NomeAtt = "Carisma" or "Atributo" local AttTot = tonumber(sheet.modCAR) or 0 local Teste = math.random(1,20); local Teste2 = Teste + AttTot; local mesa = Firecast.getMesaDe(sheet); mesa.activeChat:enviarMensagem("Total de [§B]" .. NomeAtt .. "[§B]: " .. Teste2 .. " [[§i]Dado:[§i] " .. Teste .. "]") end, obj); obj._e_event6 = obj.button1:addEventListener("onClick", function (_) if sheet==nil then return end sheet.ImagemSlot1 = ""; sheet.NomeSlot1 = ""; sheet.LevelSlot1 = ""; sheet.GenderSlot1 = ""; sheet.baseHPAtual1 = 0; sheet.baseHPMAX1 = 0; end, obj); obj._e_event7 = obj.button2:addEventListener("onClick", function (_) if sheet==nil then return end sheet.ImagemSlot2 = ""; sheet.NomeSlot2 = ""; sheet.LevelSlot2 = ""; sheet.GenderSlot2 = ""; sheet.baseHPAtual2 = 0; sheet.baseHPMAX2 = 0; end, obj); obj._e_event8 = obj.button3:addEventListener("onClick", function (_) if sheet==nil then return end sheet.ImagemSlot3 = ""; sheet.NomeSlot3 = ""; sheet.LevelSlot3 = ""; sheet.GenderSlot3 = ""; sheet.baseHPAtual3 = 0; sheet.baseHPMAX3 = 0; end, obj); obj._e_event9 = obj.button4:addEventListener("onClick", function (_) if sheet==nil then return end sheet.ImagemSlot4 = ""; sheet.NomeSlot4 = ""; sheet.LevelSlot4 = ""; sheet.GenderSlot4 = ""; sheet.baseHPAtual4 = 0; sheet.baseHPMAX4 = 0; end, obj); obj._e_event10 = obj.button5:addEventListener("onClick", function (_) if sheet==nil then return end sheet.ImagemSlot5 = ""; sheet.NomeSlot5 = ""; sheet.LevelSlot5 = ""; sheet.GenderSlot5 = ""; sheet.baseHPAtual5 = 0; sheet.baseHPMAX5 = 0; end, obj); obj._e_event11 = obj.button6:addEventListener("onClick", function (_) if sheet==nil then return end sheet.ImagemSlot6 = ""; sheet.NomeSlot6 = ""; sheet.LevelSlot6 = ""; sheet.GenderSlot6 = ""; sheet.baseHPAtual6 = 0; sheet.baseHPMAX6 = 0; end, obj); obj._e_event12 = obj.button7:addEventListener("onClick", function (_) self.rclListaDosItens:append(); end, obj); obj._e_event13 = obj.button8:addEventListener("onClick", function (_) self.rclListaDosItens:sort(); end, obj); obj._e_event14 = obj.rclListaDosItens:addEventListener("onSelect", function (_) local node = self.rclListaDosItens.selectedNode; self.boxDetalhesDoItem.node = node; self.boxDetalhesDoItem.visible = (node ~= nil); end, obj); obj._e_event15 = obj.rclListaDosItens:addEventListener("onCompare", function (_, nodeA, nodeB) if (nodeA.active and not nodeB.active) then return -1; elseif (not nodeA.active and nodeB.active) then return 1; else return Utils.compareStringPtBr(nodeA.campoNome, nodeB.campoNome); end; end, obj); obj._e_event16 = obj.button9:addEventListener("onClick", function (_) local xml = NDB.exportXML(self.boxDetalhesDoItem.node); local export = {}; local bytes = Utils.binaryEncode(export, "utf8", xml); local stream = Utils.newMemoryStream(); bytes = stream:write(export); Dialogs.saveFile("Salvar Ficha como XML", stream, "ficha.xml", "application/xml", function() stream:close(); showMessage("Ficha Exportada."); end); end, obj); obj._e_event17 = obj.button10:addEventListener("onClick", function (_) Dialogs.openFile("Importar Ficha", "application/xml", false, function(arquivos) local arq = arquivos[1]; local import = {}; local bytes = arq.stream:read(import, arq.stream.size); local xml = Utils.binaryDecode(import, "utf8"); NDB.importXML(self.boxDetalhesDoItem.node, xml); end); end, obj); obj._e_event18 = obj.comboBox1:addEventListener("onChange", function (_) if self.boxDetalhesDoItem.node==nil then return end if self.boxDetalhesDoItem.node.campoGenero == "1" then self.boxDetalhesDoItem.node.basSEX = "/img/Gender_Male.png" end if self.boxDetalhesDoItem.node.campoGenero == "2" then self.boxDetalhesDoItem.node.basSEX = "/img/Gender_Female.png" end if self.boxDetalhesDoItem.node.campoGenero == "3" then self.boxDetalhesDoItem.node.basSEX = "/img/Gender_Less.png" end end, obj); obj._e_event19 = obj.edit90:addEventListener("onChange", function (_) if self.boxDetalhesDoItem.node == nil then return end; local level = tonumber(self.boxDetalhesDoItem.node.pokeLevel) or 1 if 1 > level or level > 100 then return end; local xpTable = {25,50,100,150,200,400,600,800,1000,1500,2000,3000,4000,5000,6000,7000,8000,9000,10000,11500,13000,14500,16000,17500,19000,20500,22000,23500,25000,27500,30000,32500,35000,37500,4000,42500,45000,47500,50000, 55000,60000,65000,70000,75000,80000,85000,90000,95000,10000,110000,120000,130000,140000,150000,160000,170000,180000,190000,200000,210000,220000,230000,240000,250000,260000,270000,280000,290000,300000,310000,320000, 330000,340000,350000,360000,370000,380000,390000,400000,410000,420000,430000,440000,450000,460000,470000,480000,490000,500000,510000,520000,530000,540000,550000,560000,570000,580000,590000,600000}; self.boxDetalhesDoItem.node.nextLVEXP = xpTable [level]; end, obj); obj._e_event20 = obj.BotaoItemA:addEventListener("onClick", function (_) local pop = self:findControlByName("popExemplo"); if pop ~= nil then pop:setNodeObject(self.boxDetalhesDoItem.node); pop:showPopupEx("right", self.BotaoItemA); else showMessage("Ops, erro"); end; end, obj); obj._e_event21 = obj.dataLink86:addEventListener("onChange", function (_, field, oldValue, newValue) local PweakTot = {"1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x","1x"}; local weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm"} local CampoElem1Aux = self.boxDetalhesDoItem.node.campoElem1 or 0; if CampoElem1Aux == "1" then weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Norm","Norm","Norm","Norm","Immu","Norm","Norm","Norm","Norm"} end if CampoElem1Aux == "2" then weakElem1 = {"Norm","Resi","Weak","Norm","Resi","Resi","Norm","Norm","Weak","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Resi","Resi"} end if CampoElem1Aux == "3" then weakElem1 = {"Norm","Resi","Resi","Weak","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Resi","Norm"} end if CampoElem1Aux == "4" then weakElem1 = {"Norm","Norm","Norm","Resi","Norm","Norm","Norm","Norm","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Norm","Resi","Norm"} end if CampoElem1Aux == "5" then weakElem1 = {"Norm","Weak","Resi","Resi","Resi","Weak","Norm","Weak","Resi","Weak","Norm","Weak","Norm","Norm","Norm","Norm","Norm","Norm"} end if CampoElem1Aux == "6" then weakElem1 = {"Norm","Weak","Norm","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Norm","Weak","Norm"} end if CampoElem1Aux == "7" then weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Weak","Weak","Resi","Resi","Norm","Norm","Resi","Norm","Weak"} end if CampoElem1Aux == "8" then weakElem1 = {"Norm","Norm","Norm","Norm","Resi","Norm","Resi","Resi","Weak","Norm","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Resi"} end if CampoElem1Aux == "9" then weakElem1 = {"Norm","Norm","Weak","Immu","Weak","Weak","Norm","Resi","Norm","Norm","Norm","Norm","Resi","Norm","Norm","Norm","Norm","Norm"} end if CampoElem1Aux == "10" then weakElem1 = {"Norm","Norm","Norm","Weak","Resi","Weak","Resi","Norm","Immu","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Norm","Norm"} end if CampoElem1Aux == "11" then weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Resi","Norm","Norm","Norm","Resi","Weak","Norm","Weak","Norm","Weak","Norm","Norm"} end if CampoElem1Aux == "12" then weakElem1 = {"Norm","Weak","Norm","Norm","Resi","Norm","Resi","Norm","Resi","Weak","Norm","Norm","Weak","Norm","Norm","Norm","Norm","Norm"} end if CampoElem1Aux == "13" then weakElem1 = {"Resi","Resi","Weak","Norm","Weak","Norm","Weak","Resi","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm"} end if CampoElem1Aux == "14" then weakElem1 = {"Immu","Norm","Norm","Norm","Norm","Norm","Immu","Resi","Norm","Norm","Norm","Resi","Norm","Weak","Norm","Weak","Norm","Norm"} end if CampoElem1Aux == "15" then weakElem1 = {"Norm","Resi","Resi","Resi","Resi","Weak","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Weak"} end if CampoElem1Aux == "16" then weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Norm","Immu","Weak","Norm","Resi","Norm","Resi","Norm","Weak"} end if CampoElem1Aux == "17" then weakElem1 = {"Resi","Weak","Norm","Norm","Resi","Resi","Weak","Immu","Weak","Resi","Resi","Resi","Resi","Norm","Resi","Norm","Resi","Resi"} end if CampoElem1Aux == "18" then weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Resi","Norm","Norm","Immu","Resi","Weak","Norm"} end if CampoElem1Aux == "19" then weakElem1 = {"Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm"} end local weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm"} local CampoElem2Aux = self.boxDetalhesDoItem.node.campoElem2 or 0; if CampoElem2Aux == "1" then weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Norm","Norm","Norm","Norm","Immu","Norm","Norm","Norm","Norm"} end if CampoElem2Aux == "2" then weakElem2 = {"Norm","Resi","Weak","Norm","Resi","Resi","Norm","Norm","Weak","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Resi","Resi"} end if CampoElem2Aux == "3" then weakElem2 = {"Norm","Resi","Resi","Weak","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Resi","Norm"} end if CampoElem2Aux == "4" then weakElem2 = {"Norm","Norm","Norm","Resi","Norm","Norm","Norm","Norm","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Norm","Resi","Norm"} end if CampoElem2Aux == "5" then weakElem2 = {"Norm","Weak","Resi","Resi","Resi","Weak","Norm","Weak","Resi","Weak","Norm","Weak","Norm","Norm","Norm","Norm","Norm","Norm"} end if CampoElem2Aux == "6" then weakElem2 = {"Norm","Weak","Norm","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Norm","Weak","Norm"} end if CampoElem2Aux == "7" then weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Weak","Weak","Resi","Resi","Norm","Norm","Resi","Norm","Weak"} end if CampoElem2Aux == "8" then weakElem2 = {"Norm","Norm","Norm","Norm","Resi","Norm","Resi","Resi","Weak","Norm","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Resi"} end if CampoElem2Aux == "9" then weakElem2 = {"Norm","Norm","Weak","Immu","Weak","Weak","Norm","Resi","Norm","Norm","Norm","Norm","Resi","Norm","Norm","Norm","Norm","Norm"} end if CampoElem2Aux == "10" then weakElem2 = {"Norm","Norm","Norm","Weak","Resi","Weak","Resi","Norm","Immu","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Norm","Norm"} end if CampoElem2Aux == "11" then weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Resi","Norm","Norm","Norm","Resi","Weak","Norm","Weak","Norm","Weak","Norm","Norm"} end if CampoElem2Aux == "12" then weakElem2 = {"Norm","Weak","Norm","Norm","Resi","Norm","Resi","Norm","Resi","Weak","Norm","Norm","Weak","Norm","Norm","Norm","Norm","Norm"} end if CampoElem2Aux == "13" then weakElem2 = {"Resi","Resi","Weak","Norm","Weak","Norm","Weak","Resi","Weak","Resi","Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm"} end if CampoElem2Aux == "14" then weakElem2 = {"Immu","Norm","Norm","Norm","Norm","Norm","Immu","Resi","Norm","Norm","Norm","Resi","Norm","Weak","Norm","Weak","Norm","Norm"} end if CampoElem2Aux == "15" then weakElem2 = {"Norm","Resi","Resi","Resi","Resi","Weak","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Weak"} end if CampoElem2Aux == "16" then weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Weak","Norm","Norm","Norm","Immu","Weak","Norm","Resi","Norm","Resi","Norm","Weak"} end if CampoElem2Aux == "17" then weakElem2 = {"Resi","Weak","Norm","Norm","Resi","Resi","Weak","Immu","Weak","Resi","Resi","Resi","Resi","Norm","Resi","Norm","Resi","Resi"} end if CampoElem2Aux == "18" then weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Resi","Weak","Norm","Norm","Norm","Resi","Norm","Norm","Immu","Resi","Weak","Norm"} end if CampoElem2Aux == "19" then weakElem2 = {"Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm","Norm"} end for i=1, 18, 1 do if (weakElem1[i] == "Norm" and weakElem2[i] == "Norm") then PweakTot[i] = "x1" end if (weakElem1[i] == "Resi" and weakElem2[i] == "Resi") then PweakTot[i] = "x0.25" end if (weakElem1[i] == "Immu" and weakElem2[i] == "Immu") then PweakTot[i] = "x0" end if (weakElem1[i] == "Weak" and weakElem2[i] == "Weak") then PweakTot[i] = "x2" end if (weakElem1[i] == "Resi" and weakElem2[i] == "Norm") then PweakTot[i] = "x0.5" end if (weakElem1[i] == "Norm" and weakElem2[i] == "Resi") then PweakTot[i] = "x0.5" end if (weakElem1[i] == "Weak" and weakElem2[i] == "Norm") then PweakTot[i] = "x1.5" end if (weakElem1[i] == "Norm" and weakElem2[i] == "Weak") then PweakTot[i] = "x1.5" end if (weakElem1[i] == "Immu" and weakElem2[i] == "Norm") then PweakTot[i] = "x0" end if (weakElem1[i] == "Norm" and weakElem2[i] == "Immu") then PweakTot[i] = "x0" end if (weakElem1[i] == "Resi" and weakElem2[i] == "Weak") then PweakTot[i] = "x1" end if (weakElem1[i] == "Weak" and weakElem2[i] == "Resi") then PweakTot[i] = "x1" end if (weakElem1[i] == "Resi" and weakElem2[i] == "Immu") then PweakTot[i] = "x0" end if (weakElem1[i] == "Immu" and weakElem2[i] == "Resi") then PweakTot[i] = "x0" end if (weakElem1[i] == "Immu" and weakElem2[i] == "Weak") then PweakTot[i] = "x0" end if (weakElem1[i] == "Weak" and weakElem2[i] == "Immu") then PweakTot[i] = "x0" end end self.boxDetalhesDoItem.node.weakTot1 = PweakTot[1] or "x1" self.boxDetalhesDoItem.node.weakTot2 = PweakTot[2] or "x1" self.boxDetalhesDoItem.node.weakTot3 = PweakTot[3] or "x1" self.boxDetalhesDoItem.node.weakTot4 = PweakTot[4] or "x1" self.boxDetalhesDoItem.node.weakTot5 = PweakTot[5] or "x1" self.boxDetalhesDoItem.node.weakTot6 = PweakTot[6] or "x1" self.boxDetalhesDoItem.node.weakTot7 = PweakTot[7] or "x1" self.boxDetalhesDoItem.node.weakTot8 = PweakTot[8] or "x1" self.boxDetalhesDoItem.node.weakTot9 = PweakTot[9] or "x1" self.boxDetalhesDoItem.node.weakTot10 = PweakTot[10] or "x1" self.boxDetalhesDoItem.node.weakTot11 = PweakTot[11] or "x1" self.boxDetalhesDoItem.node.weakTot12 = PweakTot[12] or "x1" self.boxDetalhesDoItem.node.weakTot13 = PweakTot[13] or "x1" self.boxDetalhesDoItem.node.weakTot14 = PweakTot[14] or "x1" self.boxDetalhesDoItem.node.weakTot15 = PweakTot[15] or "x1" self.boxDetalhesDoItem.node.weakTot16 = PweakTot[16] or "x1" self.boxDetalhesDoItem.node.weakTot17 = PweakTot[17] or "x1" self.boxDetalhesDoItem.node.weakTot18 = PweakTot[18] or "x1" end, obj); obj._e_event22 = obj.dataLink87:addEventListener("onChange", function (_, field, oldValue, newValue) if self.boxDetalhesDoItem.node == nil then return end; local EdCtable = {0.4,0.5,0.6,0.7,0.8,0.9,1,1.2,1.4,1.6,1.8,2,2.2}; AuxMega = 0; if (not self.boxDetalhesDoItem.node.MegaEvo) then AuxMega = 0; end if (self.boxDetalhesDoItem.node.MegaEvo == true) then AuxMega = 1; end local HPBase1 = self.boxDetalhesDoItem.node.Vida_Base1 or 0; local HPBon1 = self.boxDetalhesDoItem.node.Vida_Bon1 or 0; local HPNivel = self.boxDetalhesDoItem.node.Vida_Nivel or 0; local HPVitam = self.boxDetalhesDoItem.node.Vida_Vit or 0; local PokInjuries = tonumber(self.boxDetalhesDoItem.node.pokHP_Les) or 0; if (HPBase1 > 0) then self.boxDetalhesDoItem.node.Vida_Form1 = math.floor((HPBase1 + HPNivel + HPVitam + HPBon1)); end if (HPBase1 == 0) then self.boxDetalhesDoItem.node.Vida_Form1 = 0; end local ATKBase1 = self.boxDetalhesDoItem.node.Ataque_Base1 or 0; local ATKBon1 = self.boxDetalhesDoItem.node.Ataque_Bon1 or 0; local ATKBon2 = self.boxDetalhesDoItem.node.Ataque_Bon2 or 0; local ATKNivel = self.boxDetalhesDoItem.node.Ataque_Nivel or 0; local ATKVitam = self.boxDetalhesDoItem.node.Ataque_Vit or 0; local ATKedc = tonumber(self.boxDetalhesDoItem.node.Ataque_edc) or 7; if 1 > ATKedc then ATKedc = 7 end; if ATKedc > 13 then ATKedc = 7 end; if (ATKBase1 > 0) then self.boxDetalhesDoItem.node.Ataque_Form1 = math.floor((ATKBase1 + ATKNivel + ATKVitam + ATKBon1 + ATKBon2*AuxMega)*EdCtable[ATKedc]); end if (ATKBase1 == 0) then self.boxDetalhesDoItem.node.Ataque_Form1 = 0; end local DEFBase1 = self.boxDetalhesDoItem.node.Defesa_Base1 or 0; local DEFBon1 = self.boxDetalhesDoItem.node.Defesa_Bon1 or 0; local DEFBon2 = self.boxDetalhesDoItem.node.Defesa_Bon2 or 0; local DEFNivel = self.boxDetalhesDoItem.node.Defesa_Nivel or 0; local DEFVitam = self.boxDetalhesDoItem.node.Defesa_Vit or 0; local DEFedc = tonumber(self.boxDetalhesDoItem.node.Defesa_edc) or 7; if 1 > DEFedc then DEFedc = 7 end; if DEFedc > 13 then DEFedc = 7 end; if (DEFBase1 > 0) then self.boxDetalhesDoItem.node.Defesa_Form1 = math.floor((DEFBase1 + DEFNivel + DEFVitam + DEFBon1 + DEFBon2*AuxMega)*EdCtable[DEFedc]); end if (DEFBase1 == 0) then self.boxDetalhesDoItem.node.Defesa_Form1 = 0; end local AESBase1 = self.boxDetalhesDoItem.node.AtaqueEsp_Base1 or 0; local AESBon1 = self.boxDetalhesDoItem.node.AtaqueEsp_Bon1 or 0; local AESBon2 = self.boxDetalhesDoItem.node.AtaqueEsp_Bon2 or 0; local AESNivel = self.boxDetalhesDoItem.node.AtaqueEsp_Nivel or 0; local AESVitam = self.boxDetalhesDoItem.node.AtaqueEsp_Vit or 0; local AESedc = tonumber(self.boxDetalhesDoItem.node.AtaqueEsp_edc) or 7; if 1 > AESedc then AESedc = 7 end; if AESedc > 13 then AESedc = 7 end; if (AESBase1 > 0) then self.boxDetalhesDoItem.node.AtaqueEsp_Form1 = math.floor((AESBase1 + AESNivel + AESVitam + AESBon1 + AESBon2*AuxMega)*EdCtable[AESedc]); end if (AESBase1 == 0) then self.boxDetalhesDoItem.node.AtaqueEsp_Form1 = 0; end local DESBase1 = self.boxDetalhesDoItem.node.DefesaEsp_Base1 or 0; local DESBon1 = self.boxDetalhesDoItem.node.DefesaEsp_Bon1 or 0; local DESBon2 = self.boxDetalhesDoItem.node.DefesaEsp_Bon2 or 0; local DESNivel = self.boxDetalhesDoItem.node.DefesaEsp_Nivel or 0; local DESVitam = self.boxDetalhesDoItem.node.DefesaEsp_Vit or 0; local DESedc = tonumber(self.boxDetalhesDoItem.node.DefesaEsp_edc) or 7; if 1 > DESedc then DESedc = 7 end; if DESedc > 13 then DESedc = 7 end; if (DESBase1 > 0) then self.boxDetalhesDoItem.node.DefesaEsp_Form1 = math.floor((DESBase1 + DESNivel + DESVitam + DESBon1 + DESBon2*AuxMega)*EdCtable[DESedc]); end if (DESBase1 == 0) then self.boxDetalhesDoItem.node.DefesaEsp_Form1 = 0; end local VelBase1 = self.boxDetalhesDoItem.node.Velocidade_Base1 or 0; local VelBon1 = self.boxDetalhesDoItem.node.Velocidade_Bon1 or 0; local VelBon2 = self.boxDetalhesDoItem.node.Velocidade_Bon2 or 0; local VelNivel = self.boxDetalhesDoItem.node.Velocidade_Nivel or 0; local VelVitam = self.boxDetalhesDoItem.node.Velocidade_Vit or 0; local Veledc = tonumber(self.boxDetalhesDoItem.node.Velocidade_edc) or 7; if 1 > Veledc then Veledc = 7 end; if Veledc > 13 then Veledc = 7 end; if (VelBase1 > 0) then self.boxDetalhesDoItem.node.Velocidade_Form1 = math.floor((VelBase1 + VelNivel + VelVitam + VelBon1 + VelBon2*AuxMega)*EdCtable[Veledc]); end if (VelBase1 == 0) then self.boxDetalhesDoItem.node.Velocidade_Form1 = 0; end local EFISbon = self.boxDetalhesDoItem.node.pok_bonEVAF or 0; local EESPbon = self.boxDetalhesDoItem.node.pok_bonEVAE or 0; local EVELbon = self.boxDetalhesDoItem.node.Pok_bonEVAV or 0; local INIbon = self.boxDetalhesDoItem.node.pok_bonINI or 0; local DEF_fim = self.boxDetalhesDoItem.node.Defesa_Form1 or 0; if DEF_fim > 30 then DEF_fim = 30; end local DEFE_fim = self.boxDetalhesDoItem.node.DefesaEsp_Form1 or 0; if DEFE_fim > 30 then DEFE_fim = 30; end local VEL_fim = self.boxDetalhesDoItem.node.Velocidade_Form1 or 0; self.boxDetalhesDoItem.node.pok_INI = math.floor(VEL_fim) + INIbon; if VEL_fim > 30 then VEL_fim = 30; end local VIDA_fim = self.boxDetalhesDoItem.node.Vida_Form1 or 0; self.boxDetalhesDoItem.node.campoEFIS = math.floor(DEF_fim/5) + EFISbon; if (self.boxDetalhesDoItem.node.campoEFIS >9) then self.boxDetalhesDoItem.node.campoEFIS = 0; end self.boxDetalhesDoItem.node.campoEESP = math.floor(DEFE_fim/5) + EESPbon; if (self.boxDetalhesDoItem.node.campoEESP >9) then self.boxDetalhesDoItem.node.campoEESP = 0; end self.boxDetalhesDoItem.node.campoEVEL = math.floor(VEL_fim/10) + EVELbon; if (self.boxDetalhesDoItem.node.campoEVEL >9) then self.boxDetalhesDoItem.node.campoEVEL = 0; end local PokeLV = self.boxDetalhesDoItem.node.pokeLevel or 1 self.boxDetalhesDoItem.node.baseHPMAX = (PokeLV + VIDA_fim*3)*((10-PokInjuries)/10); local MaxPoffins = 1 + math.floor(PokeLV/5); if (MaxPoffins or 0 >= 6) then self.boxDetalhesDoItem.node.poffinsMax = 6; end self.boxDetalhesDoItem.node.poffinsMax = MaxPoffins; local bonTutor = self.boxDetalhesDoItem.node.Treino_Bonus or 0; local MaxTutor = 1 + math.floor(PokeLV/5) + bonTutor; self.boxDetalhesDoItem.node.Treino_Total = MaxTutor; if (self.boxDetalhesDoItem.node.SlotActive1 == true) then self.boxDetalhesDoItem.node.SlotActive2 = false; self.boxDetalhesDoItem.node.SlotActive3 = false; self.boxDetalhesDoItem.node.SlotActive4 = false; self.boxDetalhesDoItem.node.SlotActive5 = false; self.boxDetalhesDoItem.node.SlotActive6 = false; self.boxDetalhesDoItem.node.SlotActive7 = false; sheet.ImagemSlot1 = (self.boxDetalhesDoItem.node.campoPokemon or ""); sheet.NomeSlot1 = (self.boxDetalhesDoItem.node.campoApelido or self.boxDetalhesDoItem.node.campoNome or ""); sheet.LevelSlot1 = (self.boxDetalhesDoItem.node.pokeLevel or "") sheet.GenderSlot1 = (self.boxDetalhesDoItem.node.basSEX or ""); self.boxDetalhesDoItem.node.active = true; sheet.baseHPAtual1 = tonumber(self.boxDetalhesDoItem.node.baseHPAtual) or 0; sheet.baseHPMAX1 = tonumber(self.boxDetalhesDoItem.node.baseHPMAX) or 0; end if (self.boxDetalhesDoItem.node.SlotActive2 == true) then self.boxDetalhesDoItem.node.SlotActive1 = false; self.boxDetalhesDoItem.node.SlotActive3 = false; self.boxDetalhesDoItem.node.SlotActive4 = false; self.boxDetalhesDoItem.node.SlotActive5 = false; self.boxDetalhesDoItem.node.SlotActive6 = false; self.boxDetalhesDoItem.node.SlotActive7 = false; sheet.ImagemSlot2 = (self.boxDetalhesDoItem.node.campoPokemon or ""); sheet.NomeSlot2 = (self.boxDetalhesDoItem.node.campoApelido or self.boxDetalhesDoItem.node.campoNome or ""); sheet.LevelSlot2 = (self.boxDetalhesDoItem.node.pokeLevel or "") sheet.GenderSlot2 = (self.boxDetalhesDoItem.node.basSEX or ""); self.boxDetalhesDoItem.node.active = true; sheet.baseHPAtual2 = tonumber(self.boxDetalhesDoItem.node.baseHPAtual) or 0; sheet.baseHPMAX2 = tonumber(self.boxDetalhesDoItem.node.baseHPMAX) or 0; end if (self.boxDetalhesDoItem.node.SlotActive3 == true) then self.boxDetalhesDoItem.node.SlotActive1 = false; self.boxDetalhesDoItem.node.SlotActive2 = false; self.boxDetalhesDoItem.node.SlotActive4 = false; self.boxDetalhesDoItem.node.SlotActive5 = false; self.boxDetalhesDoItem.node.SlotActive6 = false; self.boxDetalhesDoItem.node.SlotActive7 = false; sheet.ImagemSlot3 = (self.boxDetalhesDoItem.node.campoPokemon or ""); sheet.NomeSlot3 = (self.boxDetalhesDoItem.node.campoApelido or self.boxDetalhesDoItem.node.campoNome or ""); sheet.LevelSlot3 = (self.boxDetalhesDoItem.node.pokeLevel or "") sheet.GenderSlot3 = (self.boxDetalhesDoItem.node.basSEX or ""); self.boxDetalhesDoItem.node.active = true; sheet.baseHPAtual3 = tonumber(self.boxDetalhesDoItem.node.baseHPAtual) or 0; sheet.baseHPMAX3 = tonumber(self.boxDetalhesDoItem.node.baseHPMAX) or 0; end if (self.boxDetalhesDoItem.node.SlotActive4 == true) then self.boxDetalhesDoItem.node.SlotActive2 = false; self.boxDetalhesDoItem.node.SlotActive3 = false; self.boxDetalhesDoItem.node.SlotActive1 = false; self.boxDetalhesDoItem.node.SlotActive5 = false; self.boxDetalhesDoItem.node.SlotActive6 = false; self.boxDetalhesDoItem.node.SlotActive7 = false; sheet.ImagemSlot4 = (self.boxDetalhesDoItem.node.campoPokemon or ""); sheet.NomeSlot4 = (self.boxDetalhesDoItem.node.campoApelido or self.boxDetalhesDoItem.node.campoNome or ""); sheet.LevelSlot4 = (self.boxDetalhesDoItem.node.pokeLevel or "") sheet.GenderSlot4 = (self.boxDetalhesDoItem.node.basSEX or ""); self.boxDetalhesDoItem.node.active = true; sheet.baseHPAtual4 = tonumber(self.boxDetalhesDoItem.node.baseHPAtual) or 0; sheet.baseHPMAX4 = tonumber(self.boxDetalhesDoItem.node.baseHPMAX) or 0; end if (self.boxDetalhesDoItem.node.SlotActive5 == true) then self.boxDetalhesDoItem.node.SlotActive2 = false; self.boxDetalhesDoItem.node.SlotActive3 = false; self.boxDetalhesDoItem.node.SlotActive4 = false; self.boxDetalhesDoItem.node.SlotActive1 = false; self.boxDetalhesDoItem.node.SlotActive6 = false; self.boxDetalhesDoItem.node.SlotActive7 = false; sheet.ImagemSlot5 = (self.boxDetalhesDoItem.node.campoPokemon or ""); sheet.NomeSlot5 = (self.boxDetalhesDoItem.node.campoApelido or self.boxDetalhesDoItem.node.campoNome or ""); sheet.LevelSlot5 = (self.boxDetalhesDoItem.node.pokeLevel or "") sheet.GenderSlot5 = (self.boxDetalhesDoItem.node.basSEX or ""); self.boxDetalhesDoItem.node.active = true; sheet.baseHPAtual5 = tonumber(self.boxDetalhesDoItem.node.baseHPAtual) or 0; sheet.baseHPMAX5 = tonumber(self.boxDetalhesDoItem.node.baseHPMAX) or 0; end if (self.boxDetalhesDoItem.node.SlotActive6 == true) then self.boxDetalhesDoItem.node.SlotActive2 = false; self.boxDetalhesDoItem.node.SlotActive3 = false; self.boxDetalhesDoItem.node.SlotActive4 = false; self.boxDetalhesDoItem.node.SlotActive5 = false; self.boxDetalhesDoItem.node.SlotActive1 = false; self.boxDetalhesDoItem.node.SlotActive7 = false; sheet.ImagemSlot6 = (self.boxDetalhesDoItem.node.campoPokemon or ""); sheet.NomeSlot6 = (self.boxDetalhesDoItem.node.campoApelido or self.boxDetalhesDoItem.node.campoNome or ""); sheet.LevelSlot6 = (self.boxDetalhesDoItem.node.pokeLevel or "") sheet.GenderSlot6 = (self.boxDetalhesDoItem.node.basSEX or ""); self.boxDetalhesDoItem.node.active = true; sheet.baseHPAtual6 = tonumber(self.boxDetalhesDoItem.node.baseHPAtual) or 0; sheet.baseHPMAX6 = tonumber(self.boxDetalhesDoItem.node.baseHPMAX) or 0; end if (self.boxDetalhesDoItem.node.SlotActive7 == true) then self.boxDetalhesDoItem.node.SlotActive2 = false; self.boxDetalhesDoItem.node.SlotActive3 = false; self.boxDetalhesDoItem.node.SlotActive4 = false; self.boxDetalhesDoItem.node.SlotActive5 = false; self.boxDetalhesDoItem.node.SlotActive6 = false; self.boxDetalhesDoItem.node.SlotActive1 = false; self.boxDetalhesDoItem.node.active = false; end self.boxDetalhesDoItem.node.baseLealMAX = 20; end, obj); obj._e_event23 = obj.dataLink88:addEventListener("onChange", function (_, field, oldValue, newValue) local BonNat = self.boxDetalhesDoItem.node.campoNatPlus or ""; local PenNat = self.boxDetalhesDoItem.node.campoNatMinus or ""; if BonNat == "1" then self.boxDetalhesDoItem.node.Sabor_Fav = "Comida Salgada" elseif BonNat == "2" then self.boxDetalhesDoItem.node.Sabor_Fav = "Comida Apimentada" elseif BonNat == "3" then self.boxDetalhesDoItem.node.Sabor_Fav = "Comida Azeda" elseif BonNat == "4" then self.boxDetalhesDoItem.node.Sabor_Fav = "Comida Seca" elseif BonNat == "5" then self.boxDetalhesDoItem.node.Sabor_Fav = "Comida Amarga" elseif BonNat == "6" then self.boxDetalhesDoItem.node.Sabor_Fav = "Comida Doce" end if PenNat == "1" then self.boxDetalhesDoItem.node.Sabor_Desg = "Comida Salgada" elseif PenNat == "2" then self.boxDetalhesDoItem.node.Sabor_Desg = "Comida Apimentada" elseif PenNat == "3" then self.boxDetalhesDoItem.node.Sabor_Desg = "Comida Azeda" elseif PenNat == "4" then self.boxDetalhesDoItem.node.Sabor_Desg = "Comida Seca" elseif PenNat == "5" then self.boxDetalhesDoItem.node.Sabor_Desg = "Comida Amarga" elseif PenNat == "6" then self.boxDetalhesDoItem.node.Sabor_Desg = "Comida Doce" end if (BonNat == PenNat) then self.boxDetalhesDoItem.node.Sabor_Fav = "Sem Preferência" self.boxDetalhesDoItem.node.Sabor_Desg = "Sem Preferência" end end, obj); obj._e_event24 = obj.button11:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP1 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP1 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP1 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event25 = obj.button12:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP1 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP1) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP1 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event26 = obj.button13:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP1 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP1) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP1 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event27 = obj.button14:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP2 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP2 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP2 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event28 = obj.button15:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP2 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP2) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP2 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event29 = obj.button16:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP2 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP2) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP2 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event30 = obj.button17:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP3 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP3 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP3 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event31 = obj.button18:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP3 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP3) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP3 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event32 = obj.button19:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP3 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP3) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP3 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event33 = obj.button20:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP4 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP4 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP4 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event34 = obj.button21:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP4 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP4) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP4 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event35 = obj.button22:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP4 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP4) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP4 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event36 = obj.button23:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP5 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP5 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP5 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event37 = obj.button24:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP5 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP5) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP5 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event38 = obj.button25:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP5 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP5) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP5 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event39 = obj.button26:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP6 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP6 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP6 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event40 = obj.button27:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP6 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP6) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP6 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event41 = obj.button28:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP6 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP6) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP6 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event42 = obj.button29:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP7 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP7 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP7 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event43 = obj.button30:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP7 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP7) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP7 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event44 = obj.button31:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP7 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP7) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP7 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event45 = obj.button32:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = self.boxDetalhesDoItem.node.ataqueP8 or 0; local NomeGolpe = self.boxDetalhesDoItem.node.golpeP8 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Accuracy = self.boxDetalhesDoItem.node.AccP8 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event46 = obj.button33:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP8 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP8) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local str = ((self.boxDetalhesDoItem.node.danoP8 or "") .. "+" .. (ATK[Attribute] or "")) or "1d2"; local rolagem = Firecast.interpretarRolagem(str); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event47 = obj.button34:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = self.boxDetalhesDoItem.node.golpeP8 or "Golpe" local NomeUser = self.boxDetalhesDoItem.node.campoNome or "Pokémon" local Attribute = tonumber(self.boxDetalhesDoItem.node.classeP8) or 3; if Attribute > 3 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = self.boxDetalhesDoItem.node.Ataque_Form1 or 0; local ATKESP = self.boxDetalhesDoItem.node.AtaqueEsp_Form1 or 0; local ATK = {ATKFIS,ATKESP,0} or 0; local dado = (self.boxDetalhesDoItem.node.danoP8 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); if (Attribute == 1 or Attribute == 2) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event48 = obj.dataLink89:addEventListener("onChange", function (_, field, oldValue, newValue) local rcl = self:findControlByName("rclListaDosTalentosBase"); if rcl~= nil then rcl:sort(); end; rcl = self:findControlByName("rclListaDosTalentosAvanc"); if rcl~= nil then rcl:sort(); end; end, obj); obj._e_event49 = obj.button35:addEventListener("onClick", function (_) self.rclListaDosTalentosBase:append(); end, obj); obj._e_event50 = obj.rclListaDosTalentosBase:addEventListener("onCompare", function (_, nodeA, nodeB) return ((tonumber(nodeA.nivelHabilidade) or 0) - (tonumber(nodeB.nivelHabilidade) or 0)); end, obj); obj._e_event51 = obj.button36:addEventListener("onClick", function (_) self.rclListaDosTalentosAvanc:append(); end, obj); obj._e_event52 = obj.rclListaDosTalentosAvanc:addEventListener("onCompare", function (_, nodeA, nodeB) return ((tonumber(nodeA.nivelHabilidade) or 0) - (tonumber(nodeB.nivelHabilidade) or 0)); end, obj); obj._e_event53 = obj.button37:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque1 or 0; local NomeGolpe = sheet.golpe1 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc1 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event54 = obj.button38:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe1 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe1) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano1 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano1 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event55 = obj.button39:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe1 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe1) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano1 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano1 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event56 = obj.button40:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque2 or 0; local NomeGolpe = sheet.golpe2 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc2 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event57 = obj.button41:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe2 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe2) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano2 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano2 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event58 = obj.button42:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe2 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe2) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano2 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano2 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event59 = obj.button43:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque3 or 0; local NomeGolpe = sheet.golpe3 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc3 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event60 = obj.button44:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe3 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe3) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano3 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano3 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event61 = obj.button45:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe3 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe3) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano3 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano3 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event62 = obj.button46:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque4 or 0; local NomeGolpe = sheet.golpe4 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc4 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event63 = obj.button47:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe4 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe4) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano4 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano4 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event64 = obj.button48:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe4 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe4) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano4 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano4 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event65 = obj.button49:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque5 or 0; local NomeGolpe = sheet.golpe5 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc5 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event66 = obj.button50:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe5 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe5) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano5 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano5 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event67 = obj.button51:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe5 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe5) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano5 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano5 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event68 = obj.button52:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque6 or 0; local NomeGolpe = sheet.golpe6 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc6 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event69 = obj.button53:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe6 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe6) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano6 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano6 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event70 = obj.button54:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe6 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe6) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano6 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano6 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event71 = obj.button55:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque7 or 0; local NomeGolpe = sheet.golpe7 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc7 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event72 = obj.button56:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe7 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe7) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano7 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano7 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event73 = obj.button57:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe7 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe7) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano7 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano7 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event74 = obj.button58:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local ATAQUE = sheet.ataque8 or 0; local NomeGolpe = sheet.golpe8 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Accuracy = sheet.Acc8 or "N/A" mesaDoPersonagem.activeChat:rolarDados("1d20 + " .. ATAQUE, "Acerto (AC = " .. Accuracy .. ") de " .. NomeGolpe .. " usado por " .. NomeUser) end, obj); obj._e_event75 = obj.button59:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe8 or "Golpe" local NomeUser = sheet.baseName or "Pokémon" local Attribute = tonumber(sheet.classe8) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano8 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano8 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event76 = obj.button60:addEventListener("onClick", function (_) if sheet == nil then return end; local mesaDoPersonagem = Firecast.getMesaDe(sheet) local NomeGolpe = sheet.golpe8 or "Golpe" local NomeUser = sheet.baseName or "Treinador" local Attribute = tonumber(sheet.classe8) or 3; if Attribute > 4 then Attribute = 3; end if 1 > Attribute then Attribute = 1; end local ATKFIS = sheet.totFOR or 0; local ATKESP = sheet.totSAB or 0; local ATKWEA = sheet.totFOR or 0; local ATK = {ATKFIS,ATKESP,0,ATKWEA} or 0; local dado = (sheet.dano8 or "1d2"); local extra = (ATK[Attribute] or "") or "0"; local extra2 = sheet.BDano8 or "0" local rolagem = Firecast.interpretarRolagem(dado); rolagem:concatenar(dado); rolagem:concatenar(extra); rolagem:concatenar(extra2); if (Attribute == 1 or Attribute == 2 or Attribute == 4) then mesaDoPersonagem.activeChat:rolarDados(rolagem, "Dano CRÍTICO de " .. NomeGolpe .. " usado por " .. NomeUser) end end, obj); obj._e_event77 = obj.button61:addEventListener("onClick", function (_) self.rclConsumiveis:append(); end, obj); obj._e_event78 = obj.button62:addEventListener("onClick", function (_) self.rclItens2:append(); end, obj); obj._e_event79 = obj.button63:addEventListener("onClick", function (_) self.rclItens3:append(); end, obj); obj._e_event80 = obj.button64:addEventListener("onClick", function (_) self.rclItens4:append(); end, obj); obj._e_event81 = obj.button65:addEventListener("onClick", function (_) self.rclItens5:append(); end, obj); obj._e_event82 = obj.button66:addEventListener("onClick", function (_) self.rclItens6:append(); end, obj); obj._e_event83 = obj.button67:addEventListener("onClick", function (_) self.rclDex:append(); end, obj); obj._e_event84 = obj.rclDex:addEventListener("onCompare", function (_, nodeA, nodeB) if (nodeA.pokeNumber or 0) < (nodeB.pokeNumber or 0) then return -1; elseif (nodeA.pokeNumber or 0) > (nodeB.pokeNumber or 0) then return 1; else return utils.compareStringPtBr(nodeA.pokeSpecie, nodeB.pokeSpecie); end; end, obj); obj._e_event85 = obj.rclDex:addEventListener("onItemAdded", function (_, node, form) self.recalcDex(); end, obj); obj._e_event86 = obj.rclDex:addEventListener("onItemRemoved", function (_, node, form) self.recalcDex(); end, obj); function obj:_releaseEvents() __o_rrpgObjs.removeEventListenerById(self._e_event86); __o_rrpgObjs.removeEventListenerById(self._e_event85); __o_rrpgObjs.removeEventListenerById(self._e_event84); __o_rrpgObjs.removeEventListenerById(self._e_event83); __o_rrpgObjs.removeEventListenerById(self._e_event82); __o_rrpgObjs.removeEventListenerById(self._e_event81); __o_rrpgObjs.removeEventListenerById(self._e_event80); __o_rrpgObjs.removeEventListenerById(self._e_event79); __o_rrpgObjs.removeEventListenerById(self._e_event78); __o_rrpgObjs.removeEventListenerById(self._e_event77); __o_rrpgObjs.removeEventListenerById(self._e_event76); __o_rrpgObjs.removeEventListenerById(self._e_event75); __o_rrpgObjs.removeEventListenerById(self._e_event74); __o_rrpgObjs.removeEventListenerById(self._e_event73); __o_rrpgObjs.removeEventListenerById(self._e_event72); __o_rrpgObjs.removeEventListenerById(self._e_event71); __o_rrpgObjs.removeEventListenerById(self._e_event70); __o_rrpgObjs.removeEventListenerById(self._e_event69); __o_rrpgObjs.removeEventListenerById(self._e_event68); __o_rrpgObjs.removeEventListenerById(self._e_event67); __o_rrpgObjs.removeEventListenerById(self._e_event66); __o_rrpgObjs.removeEventListenerById(self._e_event65); __o_rrpgObjs.removeEventListenerById(self._e_event64); __o_rrpgObjs.removeEventListenerById(self._e_event63); __o_rrpgObjs.removeEventListenerById(self._e_event62); __o_rrpgObjs.removeEventListenerById(self._e_event61); __o_rrpgObjs.removeEventListenerById(self._e_event60); __o_rrpgObjs.removeEventListenerById(self._e_event59); __o_rrpgObjs.removeEventListenerById(self._e_event58); __o_rrpgObjs.removeEventListenerById(self._e_event57); __o_rrpgObjs.removeEventListenerById(self._e_event56); __o_rrpgObjs.removeEventListenerById(self._e_event55); __o_rrpgObjs.removeEventListenerById(self._e_event54); __o_rrpgObjs.removeEventListenerById(self._e_event53); __o_rrpgObjs.removeEventListenerById(self._e_event52); __o_rrpgObjs.removeEventListenerById(self._e_event51); __o_rrpgObjs.removeEventListenerById(self._e_event50); __o_rrpgObjs.removeEventListenerById(self._e_event49); __o_rrpgObjs.removeEventListenerById(self._e_event48); __o_rrpgObjs.removeEventListenerById(self._e_event47); __o_rrpgObjs.removeEventListenerById(self._e_event46); __o_rrpgObjs.removeEventListenerById(self._e_event45); __o_rrpgObjs.removeEventListenerById(self._e_event44); __o_rrpgObjs.removeEventListenerById(self._e_event43); __o_rrpgObjs.removeEventListenerById(self._e_event42); __o_rrpgObjs.removeEventListenerById(self._e_event41); __o_rrpgObjs.removeEventListenerById(self._e_event40); __o_rrpgObjs.removeEventListenerById(self._e_event39); __o_rrpgObjs.removeEventListenerById(self._e_event38); __o_rrpgObjs.removeEventListenerById(self._e_event37); __o_rrpgObjs.removeEventListenerById(self._e_event36); __o_rrpgObjs.removeEventListenerById(self._e_event35); __o_rrpgObjs.removeEventListenerById(self._e_event34); __o_rrpgObjs.removeEventListenerById(self._e_event33); __o_rrpgObjs.removeEventListenerById(self._e_event32); __o_rrpgObjs.removeEventListenerById(self._e_event31); __o_rrpgObjs.removeEventListenerById(self._e_event30); __o_rrpgObjs.removeEventListenerById(self._e_event29); __o_rrpgObjs.removeEventListenerById(self._e_event28); __o_rrpgObjs.removeEventListenerById(self._e_event27); __o_rrpgObjs.removeEventListenerById(self._e_event26); __o_rrpgObjs.removeEventListenerById(self._e_event25); __o_rrpgObjs.removeEventListenerById(self._e_event24); __o_rrpgObjs.removeEventListenerById(self._e_event23); __o_rrpgObjs.removeEventListenerById(self._e_event22); __o_rrpgObjs.removeEventListenerById(self._e_event21); __o_rrpgObjs.removeEventListenerById(self._e_event20); __o_rrpgObjs.removeEventListenerById(self._e_event19); __o_rrpgObjs.removeEventListenerById(self._e_event18); __o_rrpgObjs.removeEventListenerById(self._e_event17); __o_rrpgObjs.removeEventListenerById(self._e_event16); __o_rrpgObjs.removeEventListenerById(self._e_event15); __o_rrpgObjs.removeEventListenerById(self._e_event14); __o_rrpgObjs.removeEventListenerById(self._e_event13); __o_rrpgObjs.removeEventListenerById(self._e_event12); __o_rrpgObjs.removeEventListenerById(self._e_event11); __o_rrpgObjs.removeEventListenerById(self._e_event10); __o_rrpgObjs.removeEventListenerById(self._e_event9); __o_rrpgObjs.removeEventListenerById(self._e_event8); __o_rrpgObjs.removeEventListenerById(self._e_event7); __o_rrpgObjs.removeEventListenerById(self._e_event6); __o_rrpgObjs.removeEventListenerById(self._e_event5); __o_rrpgObjs.removeEventListenerById(self._e_event4); __o_rrpgObjs.removeEventListenerById(self._e_event3); __o_rrpgObjs.removeEventListenerById(self._e_event2); __o_rrpgObjs.removeEventListenerById(self._e_event1); __o_rrpgObjs.removeEventListenerById(self._e_event0); end; obj._oldLFMDestroy = obj.destroy; function obj:destroy() self:_releaseEvents(); if (self.handle ~= 0) and (self.setNodeDatabase ~= nil) then self:setNodeDatabase(nil); end; if self.edit273 ~= nil then self.edit273:destroy(); self.edit273 = nil; end; if self.rectangle64 ~= nil then self.rectangle64:destroy(); self.rectangle64 = nil; end; if self.dataLink71 ~= nil then self.dataLink71:destroy(); self.dataLink71 = nil; end; if self.label119 ~= nil then self.label119:destroy(); self.label119 = nil; end; if self.edit233 ~= nil then self.edit233:destroy(); self.edit233 = nil; end; if self.button15 ~= nil then self.button15:destroy(); self.button15 = nil; end; if self.edit226 ~= nil then self.edit226:destroy(); self.edit226 = nil; end; if self.layout15 ~= nil then self.layout15:destroy(); self.layout15 = nil; end; if self.edit172 ~= nil then self.edit172:destroy(); self.edit172 = nil; end; if self.layout10 ~= nil then self.layout10:destroy(); self.layout10 = nil; end; if self.dataLink33 ~= nil then self.dataLink33:destroy(); self.dataLink33 = nil; end; if self.rectangle67 ~= nil then self.rectangle67:destroy(); self.rectangle67 = nil; end; if self.edit9 ~= nil then self.edit9:destroy(); self.edit9 = nil; end; if self.label97 ~= nil then self.label97:destroy(); self.label97 = nil; end; if self.popHabilidade ~= nil then self.popHabilidade:destroy(); self.popHabilidade = nil; end; if self.button67 ~= nil then self.button67:destroy(); self.button67 = nil; end; if self.layout64 ~= nil then self.layout64:destroy(); self.layout64 = nil; end; if self.label77 ~= nil then self.label77:destroy(); self.label77 = nil; end; if self.image51 ~= nil then self.image51:destroy(); self.image51 = nil; end; if self.BotaoDES ~= nil then self.BotaoDES:destroy(); self.BotaoDES = nil; end; if self.label128 ~= nil then self.label128:destroy(); self.label128 = nil; end; if self.layout17 ~= nil then self.layout17:destroy(); self.layout17 = nil; end; if self.frmFichaRPGmeister4_svg ~= nil then self.frmFichaRPGmeister4_svg:destroy(); self.frmFichaRPGmeister4_svg = nil; end; if self.label45 ~= nil then self.label45:destroy(); self.label45 = nil; end; if self.edit262 ~= nil then self.edit262:destroy(); self.edit262 = nil; end; if self.rclDex ~= nil then self.rclDex:destroy(); self.rclDex = nil; end; if self.rectangle46 ~= nil then self.rectangle46:destroy(); self.rectangle46 = nil; end; if self.comboBox20 ~= nil then self.comboBox20:destroy(); self.comboBox20 = nil; end; if self.flowLayout1 ~= nil then self.flowLayout1:destroy(); self.flowLayout1 = nil; end; if self.layout47 ~= nil then self.layout47:destroy(); self.layout47 = nil; end; if self.label75 ~= nil then self.label75:destroy(); self.label75 = nil; end; if self.label158 ~= nil then self.label158:destroy(); self.label158 = nil; end; if self.edit76 ~= nil then self.edit76:destroy(); self.edit76 = nil; end; if self.label70 ~= nil then self.label70:destroy(); self.label70 = nil; end; if self.layout24 ~= nil then self.layout24:destroy(); self.layout24 = nil; end; if self.label143 ~= nil then self.label143:destroy(); self.label143 = nil; end; if self.label35 ~= nil then self.label35:destroy(); self.label35 = nil; end; if self.comboBox22 ~= nil then self.comboBox22:destroy(); self.comboBox22 = nil; end; if self.edit82 ~= nil then self.edit82:destroy(); self.edit82 = nil; end; if self.label192 ~= nil then self.label192:destroy(); self.label192 = nil; end; if self.label164 ~= nil then self.label164:destroy(); self.label164 = nil; end; if self.label293 ~= nil then self.label293:destroy(); self.label293 = nil; end; if self.rectangle59 ~= nil then self.rectangle59:destroy(); self.rectangle59 = nil; end; if self.button35 ~= nil then self.button35:destroy(); self.button35 = nil; end; if self.dataLink68 ~= nil then self.dataLink68:destroy(); self.dataLink68 = nil; end; if self.label186 ~= nil then self.label186:destroy(); self.label186 = nil; end; if self.label8 ~= nil then self.label8:destroy(); self.label8 = nil; end; if self.label125 ~= nil then self.label125:destroy(); self.label125 = nil; end; if self.edit11 ~= nil then self.edit11:destroy(); self.edit11 = nil; end; if self.image1 ~= nil then self.image1:destroy(); self.image1 = nil; end; if self.rectangle17 ~= nil then self.rectangle17:destroy(); self.rectangle17 = nil; end; if self.tab13 ~= nil then self.tab13:destroy(); self.tab13 = nil; end; if self.comboBox28 ~= nil then self.comboBox28:destroy(); self.comboBox28 = nil; end; if self.layout32 ~= nil then self.layout32:destroy(); self.layout32 = nil; end; if self.label49 ~= nil then self.label49:destroy(); self.label49 = nil; end; if self.comboBox10 ~= nil then self.comboBox10:destroy(); self.comboBox10 = nil; end; if self.edit156 ~= nil then self.edit156:destroy(); self.edit156 = nil; end; if self.label163 ~= nil then self.label163:destroy(); self.label163 = nil; end; if self.layout37 ~= nil then self.layout37:destroy(); self.layout37 = nil; end; if self.label195 ~= nil then self.label195:destroy(); self.label195 = nil; end; if self.edit267 ~= nil then self.edit267:destroy(); self.edit267 = nil; end; if self.textEditor15 ~= nil then self.textEditor15:destroy(); self.textEditor15 = nil; end; if self.image11 ~= nil then self.image11:destroy(); self.image11 = nil; end; if self.label162 ~= nil then self.label162:destroy(); self.label162 = nil; end; if self.label220 ~= nil then self.label220:destroy(); self.label220 = nil; end; if self.dataLink84 ~= nil then self.dataLink84:destroy(); self.dataLink84 = nil; end; if self.label52 ~= nil then self.label52:destroy(); self.label52 = nil; end; if self.button21 ~= nil then self.button21:destroy(); self.button21 = nil; end; if self.edit312 ~= nil then self.edit312:destroy(); self.edit312 = nil; end; if self.label287 ~= nil then self.label287:destroy(); self.label287 = nil; end; if self.edit115 ~= nil then self.edit115:destroy(); self.edit115 = nil; end; if self.label236 ~= nil then self.label236:destroy(); self.label236 = nil; end; if self.image56 ~= nil then self.image56:destroy(); self.image56 = nil; end; if self.label48 ~= nil then self.label48:destroy(); self.label48 = nil; end; if self.comboBox2 ~= nil then self.comboBox2:destroy(); self.comboBox2 = nil; end; if self.comboBox11 ~= nil then self.comboBox11:destroy(); self.comboBox11 = nil; end; if self.edit214 ~= nil then self.edit214:destroy(); self.edit214 = nil; end; if self.label230 ~= nil then self.label230:destroy(); self.label230 = nil; end; if self.edit339 ~= nil then self.edit339:destroy(); self.edit339 = nil; end; if self.edit260 ~= nil then self.edit260:destroy(); self.edit260 = nil; end; if self.textEditor4 ~= nil then self.textEditor4:destroy(); self.textEditor4 = nil; end; if self.edit159 ~= nil then self.edit159:destroy(); self.edit159 = nil; end; if self.label258 ~= nil then self.label258:destroy(); self.label258 = nil; end; if self.label1 ~= nil then self.label1:destroy(); self.label1 = nil; end; if self.label307 ~= nil then self.label307:destroy(); self.label307 = nil; end; if self.image9 ~= nil then self.image9:destroy(); self.image9 = nil; end; if self.edit235 ~= nil then self.edit235:destroy(); self.edit235 = nil; end; if self.button66 ~= nil then self.button66:destroy(); self.button66 = nil; end; if self.edit347 ~= nil then self.edit347:destroy(); self.edit347 = nil; end; if self.rectangle68 ~= nil then self.rectangle68:destroy(); self.rectangle68 = nil; end; if self.layout5 ~= nil then self.layout5:destroy(); self.layout5 = nil; end; if self.edit343 ~= nil then self.edit343:destroy(); self.edit343 = nil; end; if self.rectangle48 ~= nil then self.rectangle48:destroy(); self.rectangle48 = nil; end; if self.rectangle80 ~= nil then self.rectangle80:destroy(); self.rectangle80 = nil; end; if self.layout55 ~= nil then self.layout55:destroy(); self.layout55 = nil; end; if self.progressBar5 ~= nil then self.progressBar5:destroy(); self.progressBar5 = nil; end; if self.dataLink3 ~= nil then self.dataLink3:destroy(); self.dataLink3 = nil; end; if self.edit129 ~= nil then self.edit129:destroy(); self.edit129 = nil; end; if self.edit142 ~= nil then self.edit142:destroy(); self.edit142 = nil; end; if self.dataLink7 ~= nil then self.dataLink7:destroy(); self.dataLink7 = nil; end; if self.label261 ~= nil then self.label261:destroy(); self.label261 = nil; end; if self.rectangle2 ~= nil then self.rectangle2:destroy(); self.rectangle2 = nil; end; if self.edit251 ~= nil then self.edit251:destroy(); self.edit251 = nil; end; if self.label111 ~= nil then self.label111:destroy(); self.label111 = nil; end; if self.tab10 ~= nil then self.tab10:destroy(); self.tab10 = nil; end; if self.edit304 ~= nil then self.edit304:destroy(); self.edit304 = nil; end; if self.flowPart6 ~= nil then self.flowPart6:destroy(); self.flowPart6 = nil; end; if self.image10 ~= nil then self.image10:destroy(); self.image10 = nil; end; if self.button45 ~= nil then self.button45:destroy(); self.button45 = nil; end; if self.label284 ~= nil then self.label284:destroy(); self.label284 = nil; end; if self.label19 ~= nil then self.label19:destroy(); self.label19 = nil; end; if self.edit182 ~= nil then self.edit182:destroy(); self.edit182 = nil; end; if self.label116 ~= nil then self.label116:destroy(); self.label116 = nil; end; if self.edit309 ~= nil then self.edit309:destroy(); self.edit309 = nil; end; if self.edit67 ~= nil then self.edit67:destroy(); self.edit67 = nil; end; if self.rectangle12 ~= nil then self.rectangle12:destroy(); self.rectangle12 = nil; end; if self.image37 ~= nil then self.image37:destroy(); self.image37 = nil; end; if self.dataLink76 ~= nil then self.dataLink76:destroy(); self.dataLink76 = nil; end; if self.image49 ~= nil then self.image49:destroy(); self.image49 = nil; end; if self.edit176 ~= nil then self.edit176:destroy(); self.edit176 = nil; end; if self.label139 ~= nil then self.label139:destroy(); self.label139 = nil; end; if self.layout35 ~= nil then self.layout35:destroy(); self.layout35 = nil; end; if self.rectangle50 ~= nil then self.rectangle50:destroy(); self.rectangle50 = nil; end; if self.button44 ~= nil then self.button44:destroy(); self.button44 = nil; end; if self.label324 ~= nil then self.label324:destroy(); self.label324 = nil; end; if self.edit221 ~= nil then self.edit221:destroy(); self.edit221 = nil; end; if self.image52 ~= nil then self.image52:destroy(); self.image52 = nil; end; if self.rectangle58 ~= nil then self.rectangle58:destroy(); self.rectangle58 = nil; end; if self.dataLink34 ~= nil then self.dataLink34:destroy(); self.dataLink34 = nil; end; if self.edit258 ~= nil then self.edit258:destroy(); self.edit258 = nil; end; if self.label278 ~= nil then self.label278:destroy(); self.label278 = nil; end; if self.dataLink32 ~= nil then self.dataLink32:destroy(); self.dataLink32 = nil; end; if self.edit348 ~= nil then self.edit348:destroy(); self.edit348 = nil; end; if self.richEdit3 ~= nil then self.richEdit3:destroy(); self.richEdit3 = nil; end; if self.label263 ~= nil then self.label263:destroy(); self.label263 = nil; end; if self.label184 ~= nil then self.label184:destroy(); self.label184 = nil; end; if self.label2 ~= nil then self.label2:destroy(); self.label2 = nil; end; if self.label38 ~= nil then self.label38:destroy(); self.label38 = nil; end; if self.comboBox15 ~= nil then self.comboBox15:destroy(); self.comboBox15 = nil; end; if self.edit27 ~= nil then self.edit27:destroy(); self.edit27 = nil; end; if self.layout14 ~= nil then self.layout14:destroy(); self.layout14 = nil; end; if self.label115 ~= nil then self.label115:destroy(); self.label115 = nil; end; if self.scrollBox5 ~= nil then self.scrollBox5:destroy(); self.scrollBox5 = nil; end; if self.edit161 ~= nil then self.edit161:destroy(); self.edit161 = nil; end; if self.edit241 ~= nil then self.edit241:destroy(); self.edit241 = nil; end; if self.dataLink80 ~= nil then self.dataLink80:destroy(); self.dataLink80 = nil; end; if self.edit62 ~= nil then self.edit62:destroy(); self.edit62 = nil; end; if self.label323 ~= nil then self.label323:destroy(); self.label323 = nil; end; if self.label315 ~= nil then self.label315:destroy(); self.label315 = nil; end; if self.label185 ~= nil then self.label185:destroy(); self.label185 = nil; end; if self.edit247 ~= nil then self.edit247:destroy(); self.edit247 = nil; end; if self.image34 ~= nil then self.image34:destroy(); self.image34 = nil; end; if self.edit134 ~= nil then self.edit134:destroy(); self.edit134 = nil; end; if self.label142 ~= nil then self.label142:destroy(); self.label142 = nil; end; if self.BotaoItemA ~= nil then self.BotaoItemA:destroy(); self.BotaoItemA = nil; end; if self.label200 ~= nil then self.label200:destroy(); self.label200 = nil; end; if self.imageCheckBox8 ~= nil then self.imageCheckBox8:destroy(); self.imageCheckBox8 = nil; end; if self.flowPart8 ~= nil then self.flowPart8:destroy(); self.flowPart8 = nil; end; if self.dataLink40 ~= nil then self.dataLink40:destroy(); self.dataLink40 = nil; end; if self.rectangle76 ~= nil then self.rectangle76:destroy(); self.rectangle76 = nil; end; if self.label306 ~= nil then self.label306:destroy(); self.label306 = nil; end; if self.textEditor9 ~= nil then self.textEditor9:destroy(); self.textEditor9 = nil; end; if self.edit163 ~= nil then self.edit163:destroy(); self.edit163 = nil; end; if self.button28 ~= nil then self.button28:destroy(); self.button28 = nil; end; if self.layout30 ~= nil then self.layout30:destroy(); self.layout30 = nil; end; if self.edit332 ~= nil then self.edit332:destroy(); self.edit332 = nil; end; if self.imageCheckBox4 ~= nil then self.imageCheckBox4:destroy(); self.imageCheckBox4 = nil; end; if self.label73 ~= nil then self.label73:destroy(); self.label73 = nil; end; if self.image54 ~= nil then self.image54:destroy(); self.image54 = nil; end; if self.layout59 ~= nil then self.layout59:destroy(); self.layout59 = nil; end; if self.imageCheckBox7 ~= nil then self.imageCheckBox7:destroy(); self.imageCheckBox7 = nil; end; if self.label254 ~= nil then self.label254:destroy(); self.label254 = nil; end; if self.label235 ~= nil then self.label235:destroy(); self.label235 = nil; end; if self.edit92 ~= nil then self.edit92:destroy(); self.edit92 = nil; end; if self.label32 ~= nil then self.label32:destroy(); self.label32 = nil; end; if self.rectangle66 ~= nil then self.rectangle66:destroy(); self.rectangle66 = nil; end; if self.comboBox6 ~= nil then self.comboBox6:destroy(); self.comboBox6 = nil; end; if self.label24 ~= nil then self.label24:destroy(); self.label24 = nil; end; if self.edit54 ~= nil then self.edit54:destroy(); self.edit54 = nil; end; if self.dataLink5 ~= nil then self.dataLink5:destroy(); self.dataLink5 = nil; end; if self.edit313 ~= nil then self.edit313:destroy(); self.edit313 = nil; end; if self.rectangle10 ~= nil then self.rectangle10:destroy(); self.rectangle10 = nil; end; if self.edit287 ~= nil then self.edit287:destroy(); self.edit287 = nil; end; if self.tab2 ~= nil then self.tab2:destroy(); self.tab2 = nil; end; if self.label248 ~= nil then self.label248:destroy(); self.label248 = nil; end; if self.edit358 ~= nil then self.edit358:destroy(); self.edit358 = nil; end; if self.edit24 ~= nil then self.edit24:destroy(); self.edit24 = nil; end; if self.edit59 ~= nil then self.edit59:destroy(); self.edit59 = nil; end; if self.label325 ~= nil then self.label325:destroy(); self.label325 = nil; end; if self.rectangle38 ~= nil then self.rectangle38:destroy(); self.rectangle38 = nil; end; if self.edit249 ~= nil then self.edit249:destroy(); self.edit249 = nil; end; if self.label273 ~= nil then self.label273:destroy(); self.label273 = nil; end; if self.dataLink8 ~= nil then self.dataLink8:destroy(); self.dataLink8 = nil; end; if self.edit4 ~= nil then self.edit4:destroy(); self.edit4 = nil; end; if self.layout25 ~= nil then self.layout25:destroy(); self.layout25 = nil; end; if self.edit252 ~= nil then self.edit252:destroy(); self.edit252 = nil; end; if self.tab12 ~= nil then self.tab12:destroy(); self.tab12 = nil; end; if self.label6 ~= nil then self.label6:destroy(); self.label6 = nil; end; if self.edit128 ~= nil then self.edit128:destroy(); self.edit128 = nil; end; if self.edit355 ~= nil then self.edit355:destroy(); self.edit355 = nil; end; if self.image35 ~= nil then self.image35:destroy(); self.image35 = nil; end; if self.label129 ~= nil then self.label129:destroy(); self.label129 = nil; end; if self.button13 ~= nil then self.button13:destroy(); self.button13 = nil; end; if self.edit187 ~= nil then self.edit187:destroy(); self.edit187 = nil; end; if self.edit127 ~= nil then self.edit127:destroy(); self.edit127 = nil; end; if self.edit218 ~= nil then self.edit218:destroy(); self.edit218 = nil; end; if self.edit165 ~= nil then self.edit165:destroy(); self.edit165 = nil; end; if self.edit208 ~= nil then self.edit208:destroy(); self.edit208 = nil; end; if self.layout26 ~= nil then self.layout26:destroy(); self.layout26 = nil; end; if self.label215 ~= nil then self.label215:destroy(); self.label215 = nil; end; if self.edit8 ~= nil then self.edit8:destroy(); self.edit8 = nil; end; if self.label196 ~= nil then self.label196:destroy(); self.label196 = nil; end; if self.button32 ~= nil then self.button32:destroy(); self.button32 = nil; end; if self.edit145 ~= nil then self.edit145:destroy(); self.edit145 = nil; end; if self.label53 ~= nil then self.label53:destroy(); self.label53 = nil; end; if self.button27 ~= nil then self.button27:destroy(); self.button27 = nil; end; if self.label317 ~= nil then self.label317:destroy(); self.label317 = nil; end; if self.label133 ~= nil then self.label133:destroy(); self.label133 = nil; end; if self.label201 ~= nil then self.label201:destroy(); self.label201 = nil; end; if self.edit21 ~= nil then self.edit21:destroy(); self.edit21 = nil; end; if self.button24 ~= nil then self.button24:destroy(); self.button24 = nil; end; if self.edit302 ~= nil then self.edit302:destroy(); self.edit302 = nil; end; if self.label42 ~= nil then self.label42:destroy(); self.label42 = nil; end; if self.edit250 ~= nil then self.edit250:destroy(); self.edit250 = nil; end; if self.edit261 ~= nil then self.edit261:destroy(); self.edit261 = nil; end; if self.rectangle20 ~= nil then self.rectangle20:destroy(); self.rectangle20 = nil; end; if self.edit133 ~= nil then self.edit133:destroy(); self.edit133 = nil; end; if self.rectangle62 ~= nil then self.rectangle62:destroy(); self.rectangle62 = nil; end; if self.edit308 ~= nil then self.edit308:destroy(); self.edit308 = nil; end; if self.edit300 ~= nil then self.edit300:destroy(); self.edit300 = nil; end; if self.edit13 ~= nil then self.edit13:destroy(); self.edit13 = nil; end; if self.dataLink35 ~= nil then self.dataLink35:destroy(); self.dataLink35 = nil; end; if self.dataLink69 ~= nil then self.dataLink69:destroy(); self.dataLink69 = nil; end; if self.edit225 ~= nil then self.edit225:destroy(); self.edit225 = nil; end; if self.frmPokemon4 ~= nil then self.frmPokemon4:destroy(); self.frmPokemon4 = nil; end; if self.edit81 ~= nil then self.edit81:destroy(); self.edit81 = nil; end; if self.label181 ~= nil then self.label181:destroy(); self.label181 = nil; end; if self.label81 ~= nil then self.label81:destroy(); self.label81 = nil; end; if self.label166 ~= nil then self.label166:destroy(); self.label166 = nil; end; if self.dataLink22 ~= nil then self.dataLink22:destroy(); self.dataLink22 = nil; end; if self.edit166 ~= nil then self.edit166:destroy(); self.edit166 = nil; end; if self.button6 ~= nil then self.button6:destroy(); self.button6 = nil; end; if self.label199 ~= nil then self.label199:destroy(); self.label199 = nil; end; if self.dataLink83 ~= nil then self.dataLink83:destroy(); self.dataLink83 = nil; end; if self.edit184 ~= nil then self.edit184:destroy(); self.edit184 = nil; end; if self.textEditor10 ~= nil then self.textEditor10:destroy(); self.textEditor10 = nil; end; if self.layout70 ~= nil then self.layout70:destroy(); self.layout70 = nil; end; if self.edit314 ~= nil then self.edit314:destroy(); self.edit314 = nil; end; if self.dataLink30 ~= nil then self.dataLink30:destroy(); self.dataLink30 = nil; end; if self.edit17 ~= nil then self.edit17:destroy(); self.edit17 = nil; end; if self.button10 ~= nil then self.button10:destroy(); self.button10 = nil; end; if self.edit170 ~= nil then self.edit170:destroy(); self.edit170 = nil; end; if self.image50 ~= nil then self.image50:destroy(); self.image50 = nil; end; if self.label304 ~= nil then self.label304:destroy(); self.label304 = nil; end; if self.layout67 ~= nil then self.layout67:destroy(); self.layout67 = nil; end; if self.rectangle78 ~= nil then self.rectangle78:destroy(); self.rectangle78 = nil; end; if self.edit87 ~= nil then self.edit87:destroy(); self.edit87 = nil; end; if self.layout29 ~= nil then self.layout29:destroy(); self.layout29 = nil; end; if self.rectangle63 ~= nil then self.rectangle63:destroy(); self.rectangle63 = nil; end; if self.label79 ~= nil then self.label79:destroy(); self.label79 = nil; end; if self.label280 ~= nil then self.label280:destroy(); self.label280 = nil; end; if self.edit113 ~= nil then self.edit113:destroy(); self.edit113 = nil; end; if self.label11 ~= nil then self.label11:destroy(); self.label11 = nil; end; if self.edit15 ~= nil then self.edit15:destroy(); self.edit15 = nil; end; if self.button54 ~= nil then self.button54:destroy(); self.button54 = nil; end; if self.label20 ~= nil then self.label20:destroy(); self.label20 = nil; end; if self.edit211 ~= nil then self.edit211:destroy(); self.edit211 = nil; end; if self.label240 ~= nil then self.label240:destroy(); self.label240 = nil; end; if self.rectangle36 ~= nil then self.rectangle36:destroy(); self.rectangle36 = nil; end; if self.dataLink67 ~= nil then self.dataLink67:destroy(); self.dataLink67 = nil; end; if self.label7 ~= nil then self.label7:destroy(); self.label7 = nil; end; if self.label50 ~= nil then self.label50:destroy(); self.label50 = nil; end; if self.dataLink57 ~= nil then self.dataLink57:destroy(); self.dataLink57 = nil; end; if self.button18 ~= nil then self.button18:destroy(); self.button18 = nil; end; if self.label298 ~= nil then self.label298:destroy(); self.label298 = nil; end; if self.image15 ~= nil then self.image15:destroy(); self.image15 = nil; end; if self.edit154 ~= nil then self.edit154:destroy(); self.edit154 = nil; end; if self.label281 ~= nil then self.label281:destroy(); self.label281 = nil; end; if self.edit278 ~= nil then self.edit278:destroy(); self.edit278 = nil; end; if self.scrollBox4 ~= nil then self.scrollBox4:destroy(); self.scrollBox4 = nil; end; if self.layout22 ~= nil then self.layout22:destroy(); self.layout22 = nil; end; if self.edit281 ~= nil then self.edit281:destroy(); self.edit281 = nil; end; if self.edit135 ~= nil then self.edit135:destroy(); self.edit135 = nil; end; if self.edit191 ~= nil then self.edit191:destroy(); self.edit191 = nil; end; if self.edit32 ~= nil then self.edit32:destroy(); self.edit32 = nil; end; if self.image44 ~= nil then self.image44:destroy(); self.image44 = nil; end; if self.label262 ~= nil then self.label262:destroy(); self.label262 = nil; end; if self.edit215 ~= nil then self.edit215:destroy(); self.edit215 = nil; end; if self.image53 ~= nil then self.image53:destroy(); self.image53 = nil; end; if self.rclItens6 ~= nil then self.rclItens6:destroy(); self.rclItens6 = nil; end; if self.rectangle34 ~= nil then self.rectangle34:destroy(); self.rectangle34 = nil; end; if self.comboBox24 ~= nil then self.comboBox24:destroy(); self.comboBox24 = nil; end; if self.label110 ~= nil then self.label110:destroy(); self.label110 = nil; end; if self.edit222 ~= nil then self.edit222:destroy(); self.edit222 = nil; end; if self.edit333 ~= nil then self.edit333:destroy(); self.edit333 = nil; end; if self.rectangle37 ~= nil then self.rectangle37:destroy(); self.rectangle37 = nil; end; if self.edit310 ~= nil then self.edit310:destroy(); self.edit310 = nil; end; if self.label151 ~= nil then self.label151:destroy(); self.label151 = nil; end; if self.layout58 ~= nil then self.layout58:destroy(); self.layout58 = nil; end; if self.dataLink28 ~= nil then self.dataLink28:destroy(); self.dataLink28 = nil; end; if self.label138 ~= nil then self.label138:destroy(); self.label138 = nil; end; if self.label40 ~= nil then self.label40:destroy(); self.label40 = nil; end; if self.image5 ~= nil then self.image5:destroy(); self.image5 = nil; end; if self.image7 ~= nil then self.image7:destroy(); self.image7 = nil; end; if self.edit28 ~= nil then self.edit28:destroy(); self.edit28 = nil; end; if self.label57 ~= nil then self.label57:destroy(); self.label57 = nil; end; if self.dataLink73 ~= nil then self.dataLink73:destroy(); self.dataLink73 = nil; end; if self.label188 ~= nil then self.label188:destroy(); self.label188 = nil; end; if self.edit71 ~= nil then self.edit71:destroy(); self.edit71 = nil; end; if self.label71 ~= nil then self.label71:destroy(); self.label71 = nil; end; if self.button47 ~= nil then self.button47:destroy(); self.button47 = nil; end; if self.edit85 ~= nil then self.edit85:destroy(); self.edit85 = nil; end; if self.edit201 ~= nil then self.edit201:destroy(); self.edit201 = nil; end; if self.BotaoFOR ~= nil then self.BotaoFOR:destroy(); self.BotaoFOR = nil; end; if self.button56 ~= nil then self.button56:destroy(); self.button56 = nil; end; if self.label177 ~= nil then self.label177:destroy(); self.label177 = nil; end; if self.layout38 ~= nil then self.layout38:destroy(); self.layout38 = nil; end; if self.dataLink21 ~= nil then self.dataLink21:destroy(); self.dataLink21 = nil; end; if self.layout13 ~= nil then self.layout13:destroy(); self.layout13 = nil; end; if self.edit192 ~= nil then self.edit192:destroy(); self.edit192 = nil; end; if self.label144 ~= nil then self.label144:destroy(); self.label144 = nil; end; if self.layout8 ~= nil then self.layout8:destroy(); self.layout8 = nil; end; if self.edit246 ~= nil then self.edit246:destroy(); self.edit246 = nil; end; if self.label27 ~= nil then self.label27:destroy(); self.label27 = nil; end; if self.button20 ~= nil then self.button20:destroy(); self.button20 = nil; end; if self.label68 ~= nil then self.label68:destroy(); self.label68 = nil; end; if self.dataLink23 ~= nil then self.dataLink23:destroy(); self.dataLink23 = nil; end; if self.edit298 ~= nil then self.edit298:destroy(); self.edit298 = nil; end; if self.label67 ~= nil then self.label67:destroy(); self.label67 = nil; end; if self.edit169 ~= nil then self.edit169:destroy(); self.edit169 = nil; end; if self.layout68 ~= nil then self.layout68:destroy(); self.layout68 = nil; end; if self.label247 ~= nil then self.label247:destroy(); self.label247 = nil; end; if self.label275 ~= nil then self.label275:destroy(); self.label275 = nil; end; if self.edit244 ~= nil then self.edit244:destroy(); self.edit244 = nil; end; if self.label140 ~= nil then self.label140:destroy(); self.label140 = nil; end; if self.edit120 ~= nil then self.edit120:destroy(); self.edit120 = nil; end; if self.label69 ~= nil then self.label69:destroy(); self.label69 = nil; end; if self.dataLink53 ~= nil then self.dataLink53:destroy(); self.dataLink53 = nil; end; if self.edit114 ~= nil then self.edit114:destroy(); self.edit114 = nil; end; if self.label105 ~= nil then self.label105:destroy(); self.label105 = nil; end; if self.label154 ~= nil then self.label154:destroy(); self.label154 = nil; end; if self.label34 ~= nil then self.label34:destroy(); self.label34 = nil; end; if self.edit5 ~= nil then self.edit5:destroy(); self.edit5 = nil; end; if self.edit204 ~= nil then self.edit204:destroy(); self.edit204 = nil; end; if self.label203 ~= nil then self.label203:destroy(); self.label203 = nil; end; if self.rectangle70 ~= nil then self.rectangle70:destroy(); self.rectangle70 = nil; end; if self.label301 ~= nil then self.label301:destroy(); self.label301 = nil; end; if self.label145 ~= nil then self.label145:destroy(); self.label145 = nil; end; if self.tab5 ~= nil then self.tab5:destroy(); self.tab5 = nil; end; if self.label88 ~= nil then self.label88:destroy(); self.label88 = nil; end; if self.rectangle15 ~= nil then self.rectangle15:destroy(); self.rectangle15 = nil; end; if self.edit68 ~= nil then self.edit68:destroy(); self.edit68 = nil; end; if self.edit72 ~= nil then self.edit72:destroy(); self.edit72 = nil; end; if self.textEditor5 ~= nil then self.textEditor5:destroy(); self.textEditor5 = nil; end; if self.label131 ~= nil then self.label131:destroy(); self.label131 = nil; end; if self.label16 ~= nil then self.label16:destroy(); self.label16 = nil; end; if self.label253 ~= nil then self.label253:destroy(); self.label253 = nil; end; if self.edit158 ~= nil then self.edit158:destroy(); self.edit158 = nil; end; if self.button29 ~= nil then self.button29:destroy(); self.button29 = nil; end; if self.edit256 ~= nil then self.edit256:destroy(); self.edit256 = nil; end; if self.image29 ~= nil then self.image29:destroy(); self.image29 = nil; end; if self.edit1 ~= nil then self.edit1:destroy(); self.edit1 = nil; end; if self.edit79 ~= nil then self.edit79:destroy(); self.edit79 = nil; end; if self.comboBox14 ~= nil then self.comboBox14:destroy(); self.comboBox14 = nil; end; if self.textEditor17 ~= nil then self.textEditor17:destroy(); self.textEditor17 = nil; end; if self.label289 ~= nil then self.label289:destroy(); self.label289 = nil; end; if self.edit283 ~= nil then self.edit283:destroy(); self.edit283 = nil; end; if self.label222 ~= nil then self.label222:destroy(); self.label222 = nil; end; if self.label101 ~= nil then self.label101:destroy(); self.label101 = nil; end; if self.edit353 ~= nil then self.edit353:destroy(); self.edit353 = nil; end; if self.image27 ~= nil then self.image27:destroy(); self.image27 = nil; end; if self.layout4 ~= nil then self.layout4:destroy(); self.layout4 = nil; end; if self.edit291 ~= nil then self.edit291:destroy(); self.edit291 = nil; end; if self.edit101 ~= nil then self.edit101:destroy(); self.edit101 = nil; end; if self.edit349 ~= nil then self.edit349:destroy(); self.edit349 = nil; end; if self.image28 ~= nil then self.image28:destroy(); self.image28 = nil; end; if self.edit264 ~= nil then self.edit264:destroy(); self.edit264 = nil; end; if self.edit231 ~= nil then self.edit231:destroy(); self.edit231 = nil; end; if self.edit164 ~= nil then self.edit164:destroy(); self.edit164 = nil; end; if self.edit326 ~= nil then self.edit326:destroy(); self.edit326 = nil; end; if self.label58 ~= nil then self.label58:destroy(); self.label58 = nil; end; if self.dataLink74 ~= nil then self.dataLink74:destroy(); self.dataLink74 = nil; end; if self.flowPart9 ~= nil then self.flowPart9:destroy(); self.flowPart9 = nil; end; if self.label259 ~= nil then self.label259:destroy(); self.label259 = nil; end; if self.rectangle44 ~= nil then self.rectangle44:destroy(); self.rectangle44 = nil; end; if self.layout20 ~= nil then self.layout20:destroy(); self.layout20 = nil; end; if self.label155 ~= nil then self.label155:destroy(); self.label155 = nil; end; if self.label221 ~= nil then self.label221:destroy(); self.label221 = nil; end; if self.rclItens4 ~= nil then self.rclItens4:destroy(); self.rclItens4 = nil; end; if self.layout18 ~= nil then self.layout18:destroy(); self.layout18 = nil; end; if self.tab9 ~= nil then self.tab9:destroy(); self.tab9 = nil; end; if self.edit338 ~= nil then self.edit338:destroy(); self.edit338 = nil; end; if self.imageCheckBox9 ~= nil then self.imageCheckBox9:destroy(); self.imageCheckBox9 = nil; end; if self.edit139 ~= nil then self.edit139:destroy(); self.edit139 = nil; end; if self.rectangle6 ~= nil then self.rectangle6:destroy(); self.rectangle6 = nil; end; if self.label267 ~= nil then self.label267:destroy(); self.label267 = nil; end; if self.label283 ~= nil then self.label283:destroy(); self.label283 = nil; end; if self.label21 ~= nil then self.label21:destroy(); self.label21 = nil; end; if self.label120 ~= nil then self.label120:destroy(); self.label120 = nil; end; if self.edit354 ~= nil then self.edit354:destroy(); self.edit354 = nil; end; if self.edit293 ~= nil then self.edit293:destroy(); self.edit293 = nil; end; if self.image47 ~= nil then self.image47:destroy(); self.image47 = nil; end; if self.label245 ~= nil then self.label245:destroy(); self.label245 = nil; end; if self.edit86 ~= nil then self.edit86:destroy(); self.edit86 = nil; end; if self.edit143 ~= nil then self.edit143:destroy(); self.edit143 = nil; end; if self.edit105 ~= nil then self.edit105:destroy(); self.edit105 = nil; end; if self.progressBar2 ~= nil then self.progressBar2:destroy(); self.progressBar2 = nil; end; if self.edit239 ~= nil then self.edit239:destroy(); self.edit239 = nil; end; if self.textEditor20 ~= nil then self.textEditor20:destroy(); self.textEditor20 = nil; end; if self.label202 ~= nil then self.label202:destroy(); self.label202 = nil; end; if self.label205 ~= nil then self.label205:destroy(); self.label205 = nil; end; if self.edit230 ~= nil then self.edit230:destroy(); self.edit230 = nil; end; if self.textEditor23 ~= nil then self.textEditor23:destroy(); self.textEditor23 = nil; end; if self.image55 ~= nil then self.image55:destroy(); self.image55 = nil; end; if self.label318 ~= nil then self.label318:destroy(); self.label318 = nil; end; if self.edit90 ~= nil then self.edit90:destroy(); self.edit90 = nil; end; if self.label18 ~= nil then self.label18:destroy(); self.label18 = nil; end; if self.textEditor8 ~= nil then self.textEditor8:destroy(); self.textEditor8 = nil; end; if self.edit3 ~= nil then self.edit3:destroy(); self.edit3 = nil; end; if self.layout33 ~= nil then self.layout33:destroy(); self.layout33 = nil; end; if self.label252 ~= nil then self.label252:destroy(); self.label252 = nil; end; if self.label255 ~= nil then self.label255:destroy(); self.label255 = nil; end; if self.label117 ~= nil then self.label117:destroy(); self.label117 = nil; end; if self.label303 ~= nil then self.label303:destroy(); self.label303 = nil; end; if self.edit329 ~= nil then self.edit329:destroy(); self.edit329 = nil; end; if self.label210 ~= nil then self.label210:destroy(); self.label210 = nil; end; if self.layout21 ~= nil then self.layout21:destroy(); self.layout21 = nil; end; if self.label229 ~= nil then self.label229:destroy(); self.label229 = nil; end; if self.edit311 ~= nil then self.edit311:destroy(); self.edit311 = nil; end; if self.BotaoCAR ~= nil then self.BotaoCAR:destroy(); self.BotaoCAR = nil; end; if self.edit140 ~= nil then self.edit140:destroy(); self.edit140 = nil; end; if self.dataLink58 ~= nil then self.dataLink58:destroy(); self.dataLink58 = nil; end; if self.scrollBox1 ~= nil then self.scrollBox1:destroy(); self.scrollBox1 = nil; end; if self.rectangle71 ~= nil then self.rectangle71:destroy(); self.rectangle71 = nil; end; if self.edit270 ~= nil then self.edit270:destroy(); self.edit270 = nil; end; if self.label33 ~= nil then self.label33:destroy(); self.label33 = nil; end; if self.rectangle11 ~= nil then self.rectangle11:destroy(); self.rectangle11 = nil; end; if self.dataLink31 ~= nil then self.dataLink31:destroy(); self.dataLink31 = nil; end; if self.image19 ~= nil then self.image19:destroy(); self.image19 = nil; end; if self.label44 ~= nil then self.label44:destroy(); self.label44 = nil; end; if self.dataLink77 ~= nil then self.dataLink77:destroy(); self.dataLink77 = nil; end; if self.edit46 ~= nil then self.edit46:destroy(); self.edit46 = nil; end; if self.label95 ~= nil then self.label95:destroy(); self.label95 = nil; end; if self.label179 ~= nil then self.label179:destroy(); self.label179 = nil; end; if self.edit276 ~= nil then self.edit276:destroy(); self.edit276 = nil; end; if self.label244 ~= nil then self.label244:destroy(); self.label244 = nil; end; if self.comboBox26 ~= nil then self.comboBox26:destroy(); self.comboBox26 = nil; end; if self.label233 ~= nil then self.label233:destroy(); self.label233 = nil; end; if self.label83 ~= nil then self.label83:destroy(); self.label83 = nil; end; if self.edit288 ~= nil then self.edit288:destroy(); self.edit288 = nil; end; if self.label98 ~= nil then self.label98:destroy(); self.label98 = nil; end; if self.edit207 ~= nil then self.edit207:destroy(); self.edit207 = nil; end; if self.flowPart7 ~= nil then self.flowPart7:destroy(); self.flowPart7 = nil; end; if self.label55 ~= nil then self.label55:destroy(); self.label55 = nil; end; if self.edit12 ~= nil then self.edit12:destroy(); self.edit12 = nil; end; if self.rectangle21 ~= nil then self.rectangle21:destroy(); self.rectangle21 = nil; end; if self.edit80 ~= nil then self.edit80:destroy(); self.edit80 = nil; end; if self.label66 ~= nil then self.label66:destroy(); self.label66 = nil; end; if self.edit341 ~= nil then self.edit341:destroy(); self.edit341 = nil; end; if self.image14 ~= nil then self.image14:destroy(); self.image14 = nil; end; if self.dataLink13 ~= nil then self.dataLink13:destroy(); self.dataLink13 = nil; end; if self.edit186 ~= nil then self.edit186:destroy(); self.edit186 = nil; end; if self.textEditor19 ~= nil then self.textEditor19:destroy(); self.textEditor19 = nil; end; if self.label112 ~= nil then self.label112:destroy(); self.label112 = nil; end; if self.edit57 ~= nil then self.edit57:destroy(); self.edit57 = nil; end; if self.flowPart2 ~= nil then self.flowPart2:destroy(); self.flowPart2 = nil; end; if self.image2 ~= nil then self.image2:destroy(); self.image2 = nil; end; if self.edit147 ~= nil then self.edit147:destroy(); self.edit147 = nil; end; if self.label65 ~= nil then self.label65:destroy(); self.label65 = nil; end; if self.layout3 ~= nil then self.layout3:destroy(); self.layout3 = nil; end; if self.rectangle29 ~= nil then self.rectangle29:destroy(); self.rectangle29 = nil; end; if self.edit63 ~= nil then self.edit63:destroy(); self.edit63 = nil; end; if self.dataLink75 ~= nil then self.dataLink75:destroy(); self.dataLink75 = nil; end; if self.image46 ~= nil then self.image46:destroy(); self.image46 = nil; end; if self.label169 ~= nil then self.label169:destroy(); self.label169 = nil; end; if self.image6 ~= nil then self.image6:destroy(); self.image6 = nil; end; if self.frmPokemon3 ~= nil then self.frmPokemon3:destroy(); self.frmPokemon3 = nil; end; if self.label213 ~= nil then self.label213:destroy(); self.label213 = nil; end; if self.edit342 ~= nil then self.edit342:destroy(); self.edit342 = nil; end; if self.rclListaDosItens ~= nil then self.rclListaDosItens:destroy(); self.rclListaDosItens = nil; end; if self.label60 ~= nil then self.label60:destroy(); self.label60 = nil; end; if self.edit277 ~= nil then self.edit277:destroy(); self.edit277 = nil; end; if self.label286 ~= nil then self.label286:destroy(); self.label286 = nil; end; if self.edit340 ~= nil then self.edit340:destroy(); self.edit340 = nil; end; if self.label300 ~= nil then self.label300:destroy(); self.label300 = nil; end; if self.edit88 ~= nil then self.edit88:destroy(); self.edit88 = nil; end; if self.label150 ~= nil then self.label150:destroy(); self.label150 = nil; end; if self.edit44 ~= nil then self.edit44:destroy(); self.edit44 = nil; end; if self.layout56 ~= nil then self.layout56:destroy(); self.layout56 = nil; end; if self.label217 ~= nil then self.label217:destroy(); self.label217 = nil; end; if self.label231 ~= nil then self.label231:destroy(); self.label231 = nil; end; if self.button63 ~= nil then self.button63:destroy(); self.button63 = nil; end; if self.dataLink14 ~= nil then self.dataLink14:destroy(); self.dataLink14 = nil; end; if self.label4 ~= nil then self.label4:destroy(); self.label4 = nil; end; if self.layout66 ~= nil then self.layout66:destroy(); self.layout66 = nil; end; if self.dataLink65 ~= nil then self.dataLink65:destroy(); self.dataLink65 = nil; end; if self.edit350 ~= nil then self.edit350:destroy(); self.edit350 = nil; end; if self.progressBar4 ~= nil then self.progressBar4:destroy(); self.progressBar4 = nil; end; if self.label189 ~= nil then self.label189:destroy(); self.label189 = nil; end; if self.label290 ~= nil then self.label290:destroy(); self.label290 = nil; end; if self.label265 ~= nil then self.label265:destroy(); self.label265 = nil; end; if self.label180 ~= nil then self.label180:destroy(); self.label180 = nil; end; if self.label251 ~= nil then self.label251:destroy(); self.label251 = nil; end; if self.label172 ~= nil then self.label172:destroy(); self.label172 = nil; end; if self.button22 ~= nil then self.button22:destroy(); self.button22 = nil; end; if self.layout27 ~= nil then self.layout27:destroy(); self.layout27 = nil; end; if self.rectangle43 ~= nil then self.rectangle43:destroy(); self.rectangle43 = nil; end; if self.dataLink60 ~= nil then self.dataLink60:destroy(); self.dataLink60 = nil; end; if self.edit53 ~= nil then self.edit53:destroy(); self.edit53 = nil; end; if self.edit180 ~= nil then self.edit180:destroy(); self.edit180 = nil; end; if self.comboBox16 ~= nil then self.comboBox16:destroy(); self.comboBox16 = nil; end; if self.layout44 ~= nil then self.layout44:destroy(); self.layout44 = nil; end; if self.image16 ~= nil then self.image16:destroy(); self.image16 = nil; end; if self.label28 ~= nil then self.label28:destroy(); self.label28 = nil; end; if self.edit107 ~= nil then self.edit107:destroy(); self.edit107 = nil; end; if self.frmFichaRPGmeister2_svg ~= nil then self.frmFichaRPGmeister2_svg:destroy(); self.frmFichaRPGmeister2_svg = nil; end; if self.edit237 ~= nil then self.edit237:destroy(); self.edit237 = nil; end; if self.label308 ~= nil then self.label308:destroy(); self.label308 = nil; end; if self.button42 ~= nil then self.button42:destroy(); self.button42 = nil; end; if self.edit321 ~= nil then self.edit321:destroy(); self.edit321 = nil; end; if self.tab4 ~= nil then self.tab4:destroy(); self.tab4 = nil; end; if self.edit56 ~= nil then self.edit56:destroy(); self.edit56 = nil; end; if self.label137 ~= nil then self.label137:destroy(); self.label137 = nil; end; if self.label80 ~= nil then self.label80:destroy(); self.label80 = nil; end; if self.edit331 ~= nil then self.edit331:destroy(); self.edit331 = nil; end; if self.edit141 ~= nil then self.edit141:destroy(); self.edit141 = nil; end; if self.label232 ~= nil then self.label232:destroy(); self.label232 = nil; end; if self.comboBox5 ~= nil then self.comboBox5:destroy(); self.comboBox5 = nil; end; if self.edit43 ~= nil then self.edit43:destroy(); self.edit43 = nil; end; if self.comboBox19 ~= nil then self.comboBox19:destroy(); self.comboBox19 = nil; end; if self.label314 ~= nil then self.label314:destroy(); self.label314 = nil; end; if self.edit275 ~= nil then self.edit275:destroy(); self.edit275 = nil; end; if self.label100 ~= nil then self.label100:destroy(); self.label100 = nil; end; if self.label250 ~= nil then self.label250:destroy(); self.label250 = nil; end; if self.popItem ~= nil then self.popItem:destroy(); self.popItem = nil; end; if self.button23 ~= nil then self.button23:destroy(); self.button23 = nil; end; if self.rectangle49 ~= nil then self.rectangle49:destroy(); self.rectangle49 = nil; end; if self.rclItens3 ~= nil then self.rclItens3:destroy(); self.rclItens3 = nil; end; if self.dataLink1 ~= nil then self.dataLink1:destroy(); self.dataLink1 = nil; end; if self.label266 ~= nil then self.label266:destroy(); self.label266 = nil; end; if self.edit144 ~= nil then self.edit144:destroy(); self.edit144 = nil; end; if self.label282 ~= nil then self.label282:destroy(); self.label282 = nil; end; if self.edit346 ~= nil then self.edit346:destroy(); self.edit346 = nil; end; if self.rectangle27 ~= nil then self.rectangle27:destroy(); self.rectangle27 = nil; end; if self.label187 ~= nil then self.label187:destroy(); self.label187 = nil; end; if self.rectangle73 ~= nil then self.rectangle73:destroy(); self.rectangle73 = nil; end; if self.rectangle3 ~= nil then self.rectangle3:destroy(); self.rectangle3 = nil; end; if self.label291 ~= nil then self.label291:destroy(); self.label291 = nil; end; if self.edit219 ~= nil then self.edit219:destroy(); self.edit219 = nil; end; if self.edit51 ~= nil then self.edit51:destroy(); self.edit51 = nil; end; if self.button17 ~= nil then self.button17:destroy(); self.button17 = nil; end; if self.edit48 ~= nil then self.edit48:destroy(); self.edit48 = nil; end; if self.label85 ~= nil then self.label85:destroy(); self.label85 = nil; end; if self.edit190 ~= nil then self.edit190:destroy(); self.edit190 = nil; end; if self.label322 ~= nil then self.label322:destroy(); self.label322 = nil; end; if self.textEditor14 ~= nil then self.textEditor14:destroy(); self.textEditor14 = nil; end; if self.edit345 ~= nil then self.edit345:destroy(); self.edit345 = nil; end; if self.rectangle31 ~= nil then self.rectangle31:destroy(); self.rectangle31 = nil; end; if self.edit257 ~= nil then self.edit257:destroy(); self.edit257 = nil; end; if self.edit352 ~= nil then self.edit352:destroy(); self.edit352 = nil; end; if self.label153 ~= nil then self.label153:destroy(); self.label153 = nil; end; if self.edit259 ~= nil then self.edit259:destroy(); self.edit259 = nil; end; if self.layout40 ~= nil then self.layout40:destroy(); self.layout40 = nil; end; if self.button61 ~= nil then self.button61:destroy(); self.button61 = nil; end; if self.edit202 ~= nil then self.edit202:destroy(); self.edit202 = nil; end; if self.dataLink85 ~= nil then self.dataLink85:destroy(); self.dataLink85 = nil; end; if self.edit303 ~= nil then self.edit303:destroy(); self.edit303 = nil; end; if self.edit70 ~= nil then self.edit70:destroy(); self.edit70 = nil; end; if self.edit268 ~= nil then self.edit268:destroy(); self.edit268 = nil; end; if self.edit248 ~= nil then self.edit248:destroy(); self.edit248 = nil; end; if self.progressBar3 ~= nil then self.progressBar3:destroy(); self.progressBar3 = nil; end; if self.image23 ~= nil then self.image23:destroy(); self.image23 = nil; end; if self.image31 ~= nil then self.image31:destroy(); self.image31 = nil; end; if self.rectangle72 ~= nil then self.rectangle72:destroy(); self.rectangle72 = nil; end; if self.dataLink11 ~= nil then self.dataLink11:destroy(); self.dataLink11 = nil; end; if self.rectangle39 ~= nil then self.rectangle39:destroy(); self.rectangle39 = nil; end; if self.rectangle41 ~= nil then self.rectangle41:destroy(); self.rectangle41 = nil; end; if self.dataLink46 ~= nil then self.dataLink46:destroy(); self.dataLink46 = nil; end; if self.edit282 ~= nil then self.edit282:destroy(); self.edit282 = nil; end; if self.textEditor18 ~= nil then self.textEditor18:destroy(); self.textEditor18 = nil; end; if self.edit136 ~= nil then self.edit136:destroy(); self.edit136 = nil; end; if self.dataLink50 ~= nil then self.dataLink50:destroy(); self.dataLink50 = nil; end; if self.button14 ~= nil then self.button14:destroy(); self.button14 = nil; end; if self.edit212 ~= nil then self.edit212:destroy(); self.edit212 = nil; end; if self.edit173 ~= nil then self.edit173:destroy(); self.edit173 = nil; end; if self.label134 ~= nil then self.label134:destroy(); self.label134 = nil; end; if self.label260 ~= nil then self.label260:destroy(); self.label260 = nil; end; if self.label276 ~= nil then self.label276:destroy(); self.label276 = nil; end; if self.rectangle24 ~= nil then self.rectangle24:destroy(); self.rectangle24 = nil; end; if self.edit213 ~= nil then self.edit213:destroy(); self.edit213 = nil; end; if self.edit150 ~= nil then self.edit150:destroy(); self.edit150 = nil; end; if self.label14 ~= nil then self.label14:destroy(); self.label14 = nil; end; if self.label256 ~= nil then self.label256:destroy(); self.label256 = nil; end; if self.dataLink86 ~= nil then self.dataLink86:destroy(); self.dataLink86 = nil; end; if self.edit64 ~= nil then self.edit64:destroy(); self.edit64 = nil; end; if self.edit41 ~= nil then self.edit41:destroy(); self.edit41 = nil; end; if self.edit195 ~= nil then self.edit195:destroy(); self.edit195 = nil; end; if self.label299 ~= nil then self.label299:destroy(); self.label299 = nil; end; if self.edit36 ~= nil then self.edit36:destroy(); self.edit36 = nil; end; if self.label43 ~= nil then self.label43:destroy(); self.label43 = nil; end; if self.edit33 ~= nil then self.edit33:destroy(); self.edit33 = nil; end; if self.dataLink89 ~= nil then self.dataLink89:destroy(); self.dataLink89 = nil; end; if self.edit29 ~= nil then self.edit29:destroy(); self.edit29 = nil; end; if self.edit334 ~= nil then self.edit334:destroy(); self.edit334 = nil; end; if self.rectangle35 ~= nil then self.rectangle35:destroy(); self.rectangle35 = nil; end; if self.popExemplo ~= nil then self.popExemplo:destroy(); self.popExemplo = nil; end; if self.label96 ~= nil then self.label96:destroy(); self.label96 = nil; end; if self.label92 ~= nil then self.label92:destroy(); self.label92 = nil; end; if self.rclItens2 ~= nil then self.rclItens2:destroy(); self.rclItens2 = nil; end; if self.label148 ~= nil then self.label148:destroy(); self.label148 = nil; end; if self.rectangle16 ~= nil then self.rectangle16:destroy(); self.rectangle16 = nil; end; if self.button16 ~= nil then self.button16:destroy(); self.button16 = nil; end; if self.flowPart1 ~= nil then self.flowPart1:destroy(); self.flowPart1 = nil; end; if self.rectangle47 ~= nil then self.rectangle47:destroy(); self.rectangle47 = nil; end; if self.label63 ~= nil then self.label63:destroy(); self.label63 = nil; end; if self.dataLink18 ~= nil then self.dataLink18:destroy(); self.dataLink18 = nil; end; if self.edit296 ~= nil then self.edit296:destroy(); self.edit296 = nil; end; if self.edit265 ~= nil then self.edit265:destroy(); self.edit265 = nil; end; if self.edit236 ~= nil then self.edit236:destroy(); self.edit236 = nil; end; if self.layout23 ~= nil then self.layout23:destroy(); self.layout23 = nil; end; if self.label122 ~= nil then self.label122:destroy(); self.label122 = nil; end; if self.rectangle5 ~= nil then self.rectangle5:destroy(); self.rectangle5 = nil; end; if self.layout62 ~= nil then self.layout62:destroy(); self.layout62 = nil; end; if self.label146 ~= nil then self.label146:destroy(); self.label146 = nil; end; if self.edit297 ~= nil then self.edit297:destroy(); self.edit297 = nil; end; if self.layout9 ~= nil then self.layout9:destroy(); self.layout9 = nil; end; if self.frmPokemon1 ~= nil then self.frmPokemon1:destroy(); self.frmPokemon1 = nil; end; if self.button40 ~= nil then self.button40:destroy(); self.button40 = nil; end; if self.dataLink44 ~= nil then self.dataLink44:destroy(); self.dataLink44 = nil; end; if self.layout71 ~= nil then self.layout71:destroy(); self.layout71 = nil; end; if self.edit183 ~= nil then self.edit183:destroy(); self.edit183 = nil; end; if self.label319 ~= nil then self.label319:destroy(); self.label319 = nil; end; if self.label15 ~= nil then self.label15:destroy(); self.label15 = nil; end; if self.dataLink9 ~= nil then self.dataLink9:destroy(); self.dataLink9 = nil; end; if self.label99 ~= nil then self.label99:destroy(); self.label99 = nil; end; if self.label107 ~= nil then self.label107:destroy(); self.label107 = nil; end; if self.label161 ~= nil then self.label161:destroy(); self.label161 = nil; end; if self.edit245 ~= nil then self.edit245:destroy(); self.edit245 = nil; end; if self.rclListaDosTalentosAvanc ~= nil then self.rclListaDosTalentosAvanc:destroy(); self.rclListaDosTalentosAvanc = nil; end; if self.label82 ~= nil then self.label82:destroy(); self.label82 = nil; end; if self.rectangle33 ~= nil then self.rectangle33:destroy(); self.rectangle33 = nil; end; if self.rectangle51 ~= nil then self.rectangle51:destroy(); self.rectangle51 = nil; end; if self.button36 ~= nil then self.button36:destroy(); self.button36 = nil; end; if self.layout36 ~= nil then self.layout36:destroy(); self.layout36 = nil; end; if self.button37 ~= nil then self.button37:destroy(); self.button37 = nil; end; if self.edit69 ~= nil then self.edit69:destroy(); self.edit69 = nil; end; if self.label227 ~= nil then self.label227:destroy(); self.label227 = nil; end; if self.edit255 ~= nil then self.edit255:destroy(); self.edit255 = nil; end; if self.layout52 ~= nil then self.layout52:destroy(); self.layout52 = nil; end; if self.edit228 ~= nil then self.edit228:destroy(); self.edit228 = nil; end; if self.label288 ~= nil then self.label288:destroy(); self.label288 = nil; end; if self.label302 ~= nil then self.label302:destroy(); self.label302 = nil; end; if self.edit16 ~= nil then self.edit16:destroy(); self.edit16 = nil; end; if self.label47 ~= nil then self.label47:destroy(); self.label47 = nil; end; if self.dataLink63 ~= nil then self.dataLink63:destroy(); self.dataLink63 = nil; end; if self.edit205 ~= nil then self.edit205:destroy(); self.edit205 = nil; end; if self.button26 ~= nil then self.button26:destroy(); self.button26 = nil; end; if self.edit116 ~= nil then self.edit116:destroy(); self.edit116 = nil; end; if self.label76 ~= nil then self.label76:destroy(); self.label76 = nil; end; if self.edit77 ~= nil then self.edit77:destroy(); self.edit77 = nil; end; if self.edit52 ~= nil then self.edit52:destroy(); self.edit52 = nil; end; if self.button4 ~= nil then self.button4:destroy(); self.button4 = nil; end; if self.image42 ~= nil then self.image42:destroy(); self.image42 = nil; end; if self.edit196 ~= nil then self.edit196:destroy(); self.edit196 = nil; end; if self.layout34 ~= nil then self.layout34:destroy(); self.layout34 = nil; end; if self.label242 ~= nil then self.label242:destroy(); self.label242 = nil; end; if self.rectangle7 ~= nil then self.rectangle7:destroy(); self.rectangle7 = nil; end; if self.label176 ~= nil then self.label176:destroy(); self.label176 = nil; end; if self.edit220 ~= nil then self.edit220:destroy(); self.edit220 = nil; end; if self.rectangle55 ~= nil then self.rectangle55:destroy(); self.rectangle55 = nil; end; if self.edit316 ~= nil then self.edit316:destroy(); self.edit316 = nil; end; if self.edit58 ~= nil then self.edit58:destroy(); self.edit58 = nil; end; if self.button7 ~= nil then self.button7:destroy(); self.button7 = nil; end; if self.image45 ~= nil then self.image45:destroy(); self.image45 = nil; end; if self.label109 ~= nil then self.label109:destroy(); self.label109 = nil; end; if self.label106 ~= nil then self.label106:destroy(); self.label106 = nil; end; if self.layout42 ~= nil then self.layout42:destroy(); self.layout42 = nil; end; if self.label103 ~= nil then self.label103:destroy(); self.label103 = nil; end; if self.edit66 ~= nil then self.edit66:destroy(); self.edit66 = nil; end; if self.dataLink20 ~= nil then self.dataLink20:destroy(); self.dataLink20 = nil; end; if self.layout61 ~= nil then self.layout61:destroy(); self.layout61 = nil; end; if self.label321 ~= nil then self.label321:destroy(); self.label321 = nil; end; if self.label94 ~= nil then self.label94:destroy(); self.label94 = nil; end; if self.label212 ~= nil then self.label212:destroy(); self.label212 = nil; end; if self.edit295 ~= nil then self.edit295:destroy(); self.edit295 = nil; end; if self.label29 ~= nil then self.label29:destroy(); self.label29 = nil; end; if self.dataLink72 ~= nil then self.dataLink72:destroy(); self.dataLink72 = nil; end; if self.rectangle23 ~= nil then self.rectangle23:destroy(); self.rectangle23 = nil; end; if self.BotaoINT ~= nil then self.BotaoINT:destroy(); self.BotaoINT = nil; end; if self.dataLink6 ~= nil then self.dataLink6:destroy(); self.dataLink6 = nil; end; if self.tabControl1 ~= nil then self.tabControl1:destroy(); self.tabControl1 = nil; end; if self.label30 ~= nil then self.label30:destroy(); self.label30 = nil; end; if self.label51 ~= nil then self.label51:destroy(); self.label51 = nil; end; if self.label91 ~= nil then self.label91:destroy(); self.label91 = nil; end; if self.edit99 ~= nil then self.edit99:destroy(); self.edit99 = nil; end; if self.imageCheckBox2 ~= nil then self.imageCheckBox2:destroy(); self.imageCheckBox2 = nil; end; if self.image41 ~= nil then self.image41:destroy(); self.image41 = nil; end; if self.rectangle52 ~= nil then self.rectangle52:destroy(); self.rectangle52 = nil; end; if self.rectangle61 ~= nil then self.rectangle61:destroy(); self.rectangle61 = nil; end; if self.label268 ~= nil then self.label268:destroy(); self.label268 = nil; end; if self.edit324 ~= nil then self.edit324:destroy(); self.edit324 = nil; end; if self.button43 ~= nil then self.button43:destroy(); self.button43 = nil; end; if self.layout11 ~= nil then self.layout11:destroy(); self.layout11 = nil; end; if self.label225 ~= nil then self.label225:destroy(); self.label225 = nil; end; if self.rectangle18 ~= nil then self.rectangle18:destroy(); self.rectangle18 = nil; end; if self.rectangle14 ~= nil then self.rectangle14:destroy(); self.rectangle14 = nil; end; if self.dataLink81 ~= nil then self.dataLink81:destroy(); self.dataLink81 = nil; end; if self.label147 ~= nil then self.label147:destroy(); self.label147 = nil; end; if self.edit124 ~= nil then self.edit124:destroy(); self.edit124 = nil; end; if self.label269 ~= nil then self.label269:destroy(); self.label269 = nil; end; if self.label228 ~= nil then self.label228:destroy(); self.label228 = nil; end; if self.edit157 ~= nil then self.edit157:destroy(); self.edit157 = nil; end; if self.edit301 ~= nil then self.edit301:destroy(); self.edit301 = nil; end; if self.dataLink82 ~= nil then self.dataLink82:destroy(); self.dataLink82 = nil; end; if self.label89 ~= nil then self.label89:destroy(); self.label89 = nil; end; if self.edit284 ~= nil then self.edit284:destroy(); self.edit284 = nil; end; if self.edit83 ~= nil then self.edit83:destroy(); self.edit83 = nil; end; if self.button33 ~= nil then self.button33:destroy(); self.button33 = nil; end; if self.rectangle77 ~= nil then self.rectangle77:destroy(); self.rectangle77 = nil; end; if self.label271 ~= nil then self.label271:destroy(); self.label271 = nil; end; if self.rectangle42 ~= nil then self.rectangle42:destroy(); self.rectangle42 = nil; end; if self.edit223 ~= nil then self.edit223:destroy(); self.edit223 = nil; end; if self.label159 ~= nil then self.label159:destroy(); self.label159 = nil; end; if self.richEdit2 ~= nil then self.richEdit2:destroy(); self.richEdit2 = nil; end; if self.layout51 ~= nil then self.layout51:destroy(); self.layout51 = nil; end; if self.edit330 ~= nil then self.edit330:destroy(); self.edit330 = nil; end; if self.edit74 ~= nil then self.edit74:destroy(); self.edit74 = nil; end; if self.label305 ~= nil then self.label305:destroy(); self.label305 = nil; end; if self.image58 ~= nil then self.image58:destroy(); self.image58 = nil; end; if self.layout7 ~= nil then self.layout7:destroy(); self.layout7 = nil; end; if self.edit60 ~= nil then self.edit60:destroy(); self.edit60 = nil; end; if self.label127 ~= nil then self.label127:destroy(); self.label127 = nil; end; if self.label170 ~= nil then self.label170:destroy(); self.label170 = nil; end; if self.label194 ~= nil then self.label194:destroy(); self.label194 = nil; end; if self.label206 ~= nil then self.label206:destroy(); self.label206 = nil; end; if self.frmMochilaB ~= nil then self.frmMochilaB:destroy(); self.frmMochilaB = nil; end; if self.layout39 ~= nil then self.layout39:destroy(); self.layout39 = nil; end; if self.tab3 ~= nil then self.tab3:destroy(); self.tab3 = nil; end; if self.label246 ~= nil then self.label246:destroy(); self.label246 = nil; end; if self.layout69 ~= nil then self.layout69:destroy(); self.layout69 = nil; end; if self.image32 ~= nil then self.image32:destroy(); self.image32 = nil; end; if self.rectangle9 ~= nil then self.rectangle9:destroy(); self.rectangle9 = nil; end; if self.edit121 ~= nil then self.edit121:destroy(); self.edit121 = nil; end; if self.button51 ~= nil then self.button51:destroy(); self.button51 = nil; end; if self.dataLink55 ~= nil then self.dataLink55:destroy(); self.dataLink55 = nil; end; if self.edit263 ~= nil then self.edit263:destroy(); self.edit263 = nil; end; if self.edit199 ~= nil then self.edit199:destroy(); self.edit199 = nil; end; if self.label198 ~= nil then self.label198:destroy(); self.label198 = nil; end; if self.edit285 ~= nil then self.edit285:destroy(); self.edit285 = nil; end; if self.dataLink47 ~= nil then self.dataLink47:destroy(); self.dataLink47 = nil; end; if self.label313 ~= nil then self.label313:destroy(); self.label313 = nil; end; if self.dataLink78 ~= nil then self.dataLink78:destroy(); self.dataLink78 = nil; end; if self.textEditor3 ~= nil then self.textEditor3:destroy(); self.textEditor3 = nil; end; if self.layout60 ~= nil then self.layout60:destroy(); self.layout60 = nil; end; if self.rclItens5 ~= nil then self.rclItens5:destroy(); self.rclItens5 = nil; end; if self.image38 ~= nil then self.image38:destroy(); self.image38 = nil; end; if self.layout72 ~= nil then self.layout72:destroy(); self.layout72 = nil; end; if self.label224 ~= nil then self.label224:destroy(); self.label224 = nil; end; if self.dataLink10 ~= nil then self.dataLink10:destroy(); self.dataLink10 = nil; end; if self.label23 ~= nil then self.label23:destroy(); self.label23 = nil; end; if self.label90 ~= nil then self.label90:destroy(); self.label90 = nil; end; if self.dataLink79 ~= nil then self.dataLink79:destroy(); self.dataLink79 = nil; end; if self.button39 ~= nil then self.button39:destroy(); self.button39 = nil; end; if self.label223 ~= nil then self.label223:destroy(); self.label223 = nil; end; if self.label279 ~= nil then self.label279:destroy(); self.label279 = nil; end; if self.edit336 ~= nil then self.edit336:destroy(); self.edit336 = nil; end; if self.label61 ~= nil then self.label61:destroy(); self.label61 = nil; end; if self.edit100 ~= nil then self.edit100:destroy(); self.edit100 = nil; end; if self.layout1 ~= nil then self.layout1:destroy(); self.layout1 = nil; end; if self.edit61 ~= nil then self.edit61:destroy(); self.edit61 = nil; end; if self.image25 ~= nil then self.image25:destroy(); self.image25 = nil; end; if self.edit84 ~= nil then self.edit84:destroy(); self.edit84 = nil; end; if self.label93 ~= nil then self.label93:destroy(); self.label93 = nil; end; if self.edit224 ~= nil then self.edit224:destroy(); self.edit224 = nil; end; if self.button30 ~= nil then self.button30:destroy(); self.button30 = nil; end; if self.frmPokemon5 ~= nil then self.frmPokemon5:destroy(); self.frmPokemon5 = nil; end; if self.edit274 ~= nil then self.edit274:destroy(); self.edit274 = nil; end; if self.edit289 ~= nil then self.edit289:destroy(); self.edit289 = nil; end; if self.layout12 ~= nil then self.layout12:destroy(); self.layout12 = nil; end; if self.edit14 ~= nil then self.edit14:destroy(); self.edit14 = nil; end; if self.textEditor16 ~= nil then self.textEditor16:destroy(); self.textEditor16 = nil; end; if self.textEditor22 ~= nil then self.textEditor22:destroy(); self.textEditor22 = nil; end; if self.label216 ~= nil then self.label216:destroy(); self.label216 = nil; end; if self.edit198 ~= nil then self.edit198:destroy(); self.edit198 = nil; end; if self.label295 ~= nil then self.label295:destroy(); self.label295 = nil; end; if self.richEdit4 ~= nil then self.richEdit4:destroy(); self.richEdit4 = nil; end; if self.textEditor11 ~= nil then self.textEditor11:destroy(); self.textEditor11 = nil; end; if self.edit200 ~= nil then self.edit200:destroy(); self.edit200 = nil; end; if self.textEditor2 ~= nil then self.textEditor2:destroy(); self.textEditor2 = nil; end; if self.edit103 ~= nil then self.edit103:destroy(); self.edit103 = nil; end; if self.image12 ~= nil then self.image12:destroy(); self.image12 = nil; end; if self.dataLink45 ~= nil then self.dataLink45:destroy(); self.dataLink45 = nil; end; if self.label37 ~= nil then self.label37:destroy(); self.label37 = nil; end; if self.dataLink43 ~= nil then self.dataLink43:destroy(); self.dataLink43 = nil; end; if self.rectangle45 ~= nil then self.rectangle45:destroy(); self.rectangle45 = nil; end; if self.label214 ~= nil then self.label214:destroy(); self.label214 = nil; end; if self.button55 ~= nil then self.button55:destroy(); self.button55 = nil; end; if self.edit45 ~= nil then self.edit45:destroy(); self.edit45 = nil; end; if self.flowPart4 ~= nil then self.flowPart4:destroy(); self.flowPart4 = nil; end; if self.label86 ~= nil then self.label86:destroy(); self.label86 = nil; end; if self.edit181 ~= nil then self.edit181:destroy(); self.edit181 = nil; end; if self.edit96 ~= nil then self.edit96:destroy(); self.edit96 = nil; end; if self.edit2 ~= nil then self.edit2:destroy(); self.edit2 = nil; end; if self.edit323 ~= nil then self.edit323:destroy(); self.edit323 = nil; end; if self.comboBox7 ~= nil then self.comboBox7:destroy(); self.comboBox7 = nil; end; if self.rectangle53 ~= nil then self.rectangle53:destroy(); self.rectangle53 = nil; end; if self.edit109 ~= nil then self.edit109:destroy(); self.edit109 = nil; end; if self.tab11 ~= nil then self.tab11:destroy(); self.tab11 = nil; end; if self.button3 ~= nil then self.button3:destroy(); self.button3 = nil; end; if self.dataLink64 ~= nil then self.dataLink64:destroy(); self.dataLink64 = nil; end; if self.edit328 ~= nil then self.edit328:destroy(); self.edit328 = nil; end; if self.edit174 ~= nil then self.edit174:destroy(); self.edit174 = nil; end; if self.comboBox21 ~= nil then self.comboBox21:destroy(); self.comboBox21 = nil; end; if self.edit152 ~= nil then self.edit152:destroy(); self.edit152 = nil; end; if self.image26 ~= nil then self.image26:destroy(); self.image26 = nil; end; if self.label102 ~= nil then self.label102:destroy(); self.label102 = nil; end; if self.edit93 ~= nil then self.edit93:destroy(); self.edit93 = nil; end; if self.edit126 ~= nil then self.edit126:destroy(); self.edit126 = nil; end; if self.dataLink54 ~= nil then self.dataLink54:destroy(); self.dataLink54 = nil; end; if self.dataLink24 ~= nil then self.dataLink24:destroy(); self.dataLink24 = nil; end; if self.label132 ~= nil then self.label132:destroy(); self.label132 = nil; end; if self.frmPokemon2 ~= nil then self.frmPokemon2:destroy(); self.frmPokemon2 = nil; end; if self.edit177 ~= nil then self.edit177:destroy(); self.edit177 = nil; end; if self.dataLink70 ~= nil then self.dataLink70:destroy(); self.dataLink70 = nil; end; if self.button11 ~= nil then self.button11:destroy(); self.button11 = nil; end; if self.button58 ~= nil then self.button58:destroy(); self.button58 = nil; end; if self.dataLink61 ~= nil then self.dataLink61:destroy(); self.dataLink61 = nil; end; if self.button5 ~= nil then self.button5:destroy(); self.button5 = nil; end; if self.edit37 ~= nil then self.edit37:destroy(); self.edit37 = nil; end; if self.flowLayout2 ~= nil then self.flowLayout2:destroy(); self.flowLayout2 = nil; end; if self.layout31 ~= nil then self.layout31:destroy(); self.layout31 = nil; end; if self.dataLink27 ~= nil then self.dataLink27:destroy(); self.dataLink27 = nil; end; if self.label10 ~= nil then self.label10:destroy(); self.label10 = nil; end; if self.edit269 ~= nil then self.edit269:destroy(); self.edit269 = nil; end; if self.label175 ~= nil then self.label175:destroy(); self.label175 = nil; end; if self.layout2 ~= nil then self.layout2:destroy(); self.layout2 = nil; end; if self.rectangle30 ~= nil then self.rectangle30:destroy(); self.rectangle30 = nil; end; if self.button41 ~= nil then self.button41:destroy(); self.button41 = nil; end; if self.edit155 ~= nil then self.edit155:destroy(); self.edit155 = nil; end; if self.edit162 ~= nil then self.edit162:destroy(); self.edit162 = nil; end; if self.edit194 ~= nil then self.edit194:destroy(); self.edit194 = nil; end; if self.label39 ~= nil then self.label39:destroy(); self.label39 = nil; end; if self.flowPart3 ~= nil then self.flowPart3:destroy(); self.flowPart3 = nil; end; if self.edit299 ~= nil then self.edit299:destroy(); self.edit299 = nil; end; if self.rectangle40 ~= nil then self.rectangle40:destroy(); self.rectangle40 = nil; end; if self.label3 ~= nil then self.label3:destroy(); self.label3 = nil; end; if self.label309 ~= nil then self.label309:destroy(); self.label309 = nil; end; if self.rectangle74 ~= nil then self.rectangle74:destroy(); self.rectangle74 = nil; end; if self.label285 ~= nil then self.label285:destroy(); self.label285 = nil; end; if self.edit240 ~= nil then self.edit240:destroy(); self.edit240 = nil; end; if self.label108 ~= nil then self.label108:destroy(); self.label108 = nil; end; if self.edit138 ~= nil then self.edit138:destroy(); self.edit138 = nil; end; if self.button31 ~= nil then self.button31:destroy(); self.button31 = nil; end; if self.label292 ~= nil then self.label292:destroy(); self.label292 = nil; end; if self.button8 ~= nil then self.button8:destroy(); self.button8 = nil; end; if self.edit42 ~= nil then self.edit42:destroy(); self.edit42 = nil; end; if self.edit209 ~= nil then self.edit209:destroy(); self.edit209 = nil; end; if self.edit118 ~= nil then self.edit118:destroy(); self.edit118 = nil; end; if self.image36 ~= nil then self.image36:destroy(); self.image36 = nil; end; if self.comboBox27 ~= nil then self.comboBox27:destroy(); self.comboBox27 = nil; end; if self.edit254 ~= nil then self.edit254:destroy(); self.edit254 = nil; end; if self.label310 ~= nil then self.label310:destroy(); self.label310 = nil; end; if self.button65 ~= nil then self.button65:destroy(); self.button65 = nil; end; if self.rectangle4 ~= nil then self.rectangle4:destroy(); self.rectangle4 = nil; end; if self.layout48 ~= nil then self.layout48:destroy(); self.layout48 = nil; end; if self.label297 ~= nil then self.label297:destroy(); self.label297 = nil; end; if self.label312 ~= nil then self.label312:destroy(); self.label312 = nil; end; if self.label124 ~= nil then self.label124:destroy(); self.label124 = nil; end; if self.image4 ~= nil then self.image4:destroy(); self.image4 = nil; end; if self.label84 ~= nil then self.label84:destroy(); self.label84 = nil; end; if self.label264 ~= nil then self.label264:destroy(); self.label264 = nil; end; if self.layout73 ~= nil then self.layout73:destroy(); self.layout73 = nil; end; if self.image13 ~= nil then self.image13:destroy(); self.image13 = nil; end; if self.tab1 ~= nil then self.tab1:destroy(); self.tab1 = nil; end; if self.edit102 ~= nil then self.edit102:destroy(); self.edit102 = nil; end; if self.dataLink38 ~= nil then self.dataLink38:destroy(); self.dataLink38 = nil; end; if self.edit178 ~= nil then self.edit178:destroy(); self.edit178 = nil; end; if self.label207 ~= nil then self.label207:destroy(); self.label207 = nil; end; if self.label209 ~= nil then self.label209:destroy(); self.label209 = nil; end; if self.edit117 ~= nil then self.edit117:destroy(); self.edit117 = nil; end; if self.edit286 ~= nil then self.edit286:destroy(); self.edit286 = nil; end; if self.edit216 ~= nil then self.edit216:destroy(); self.edit216 = nil; end; if self.dataLink12 ~= nil then self.dataLink12:destroy(); self.dataLink12 = nil; end; if self.edit305 ~= nil then self.edit305:destroy(); self.edit305 = nil; end; if self.edit73 ~= nil then self.edit73:destroy(); self.edit73 = nil; end; if self.edit98 ~= nil then self.edit98:destroy(); self.edit98 = nil; end; if self.comboBox17 ~= nil then self.comboBox17:destroy(); self.comboBox17 = nil; end; if self.edit320 ~= nil then self.edit320:destroy(); self.edit320 = nil; end; if self.dataLink62 ~= nil then self.dataLink62:destroy(); self.dataLink62 = nil; end; if self.image30 ~= nil then self.image30:destroy(); self.image30 = nil; end; if self.dataLink42 ~= nil then self.dataLink42:destroy(); self.dataLink42 = nil; end; if self.rclListaDosTalentosBase ~= nil then self.rclListaDosTalentosBase:destroy(); self.rclListaDosTalentosBase = nil; end; if self.edit185 ~= nil then self.edit185:destroy(); self.edit185 = nil; end; if self.dataLink4 ~= nil then self.dataLink4:destroy(); self.dataLink4 = nil; end; if self.edit335 ~= nil then self.edit335:destroy(); self.edit335 = nil; end; if self.comboBox13 ~= nil then self.comboBox13:destroy(); self.comboBox13 = nil; end; if self.layout63 ~= nil then self.layout63:destroy(); self.layout63 = nil; end; if self.edit111 ~= nil then self.edit111:destroy(); self.edit111 = nil; end; if self.frmGeral ~= nil then self.frmGeral:destroy(); self.frmGeral = nil; end; if self.button64 ~= nil then self.button64:destroy(); self.button64 = nil; end; if self.dataLink87 ~= nil then self.dataLink87:destroy(); self.dataLink87 = nil; end; if self.image20 ~= nil then self.image20:destroy(); self.image20 = nil; end; if self.layout41 ~= nil then self.layout41:destroy(); self.layout41 = nil; end; if self.edit243 ~= nil then self.edit243:destroy(); self.edit243 = nil; end; if self.label160 ~= nil then self.label160:destroy(); self.label160 = nil; end; if self.label193 ~= nil then self.label193:destroy(); self.label193 = nil; end; if self.label22 ~= nil then self.label22:destroy(); self.label22 = nil; end; if self.button2 ~= nil then self.button2:destroy(); self.button2 = nil; end; if self.label13 ~= nil then self.label13:destroy(); self.label13 = nil; end; if self.edit153 ~= nil then self.edit153:destroy(); self.edit153 = nil; end; if self.label59 ~= nil then self.label59:destroy(); self.label59 = nil; end; if self.edit131 ~= nil then self.edit131:destroy(); self.edit131 = nil; end; if self.button38 ~= nil then self.button38:destroy(); self.button38 = nil; end; if self.edit47 ~= nil then self.edit47:destroy(); self.edit47 = nil; end; if self.button52 ~= nil then self.button52:destroy(); self.button52 = nil; end; if self.label270 ~= nil then self.label270:destroy(); self.label270 = nil; end; if self.button53 ~= nil then self.button53:destroy(); self.button53 = nil; end; if self.edit149 ~= nil then self.edit149:destroy(); self.edit149 = nil; end; if self.rectangle75 ~= nil then self.rectangle75:destroy(); self.rectangle75 = nil; end; if self.button1 ~= nil then self.button1:destroy(); self.button1 = nil; end; if self.comboBox3 ~= nil then self.comboBox3:destroy(); self.comboBox3 = nil; end; if self.edit160 ~= nil then self.edit160:destroy(); self.edit160 = nil; end; if self.rectangle57 ~= nil then self.rectangle57:destroy(); self.rectangle57 = nil; end; if self.edit26 ~= nil then self.edit26:destroy(); self.edit26 = nil; end; if self.edit112 ~= nil then self.edit112:destroy(); self.edit112 = nil; end; if self.label257 ~= nil then self.label257:destroy(); self.label257 = nil; end; if self.edit34 ~= nil then self.edit34:destroy(); self.edit34 = nil; end; if self.label31 ~= nil then self.label31:destroy(); self.label31 = nil; end; if self.edit19 ~= nil then self.edit19:destroy(); self.edit19 = nil; end; if self.tab8 ~= nil then self.tab8:destroy(); self.tab8 = nil; end; if self.label234 ~= nil then self.label234:destroy(); self.label234 = nil; end; if self.label126 ~= nil then self.label126:destroy(); self.label126 = nil; end; if self.comboBox12 ~= nil then self.comboBox12:destroy(); self.comboBox12 = nil; end; if self.edit210 ~= nil then self.edit210:destroy(); self.edit210 = nil; end; if self.layout54 ~= nil then self.layout54:destroy(); self.layout54 = nil; end; if self.edit279 ~= nil then self.edit279:destroy(); self.edit279 = nil; end; if self.layout50 ~= nil then self.layout50:destroy(); self.layout50 = nil; end; if self.label41 ~= nil then self.label41:destroy(); self.label41 = nil; end; if self.scrollBox2 ~= nil then self.scrollBox2:destroy(); self.scrollBox2 = nil; end; if self.label72 ~= nil then self.label72:destroy(); self.label72 = nil; end; if self.edit357 ~= nil then self.edit357:destroy(); self.edit357 = nil; end; if self.label12 ~= nil then self.label12:destroy(); self.label12 = nil; end; if self.label190 ~= nil then self.label190:destroy(); self.label190 = nil; end; if self.edit294 ~= nil then self.edit294:destroy(); self.edit294 = nil; end; if self.edit179 ~= nil then self.edit179:destroy(); self.edit179 = nil; end; if self.rectangle28 ~= nil then self.rectangle28:destroy(); self.rectangle28 = nil; end; if self.textEditor7 ~= nil then self.textEditor7:destroy(); self.textEditor7 = nil; end; if self.edit10 ~= nil then self.edit10:destroy(); self.edit10 = nil; end; if self.edit106 ~= nil then self.edit106:destroy(); self.edit106 = nil; end; if self.edit31 ~= nil then self.edit31:destroy(); self.edit31 = nil; end; if self.edit125 ~= nil then self.edit125:destroy(); self.edit125 = nil; end; if self.rectangle26 ~= nil then self.rectangle26:destroy(); self.rectangle26 = nil; end; if self.dataLink16 ~= nil then self.dataLink16:destroy(); self.dataLink16 = nil; end; if self.label78 ~= nil then self.label78:destroy(); self.label78 = nil; end; if self.label211 ~= nil then self.label211:destroy(); self.label211 = nil; end; if self.edit175 ~= nil then self.edit175:destroy(); self.edit175 = nil; end; if self.button59 ~= nil then self.button59:destroy(); self.button59 = nil; end; if self.label167 ~= nil then self.label167:destroy(); self.label167 = nil; end; if self.rectangle65 ~= nil then self.rectangle65:destroy(); self.rectangle65 = nil; end; if self.image3 ~= nil then self.image3:destroy(); self.image3 = nil; end; if self.edit242 ~= nil then self.edit242:destroy(); self.edit242 = nil; end; if self.edit315 ~= nil then self.edit315:destroy(); self.edit315 = nil; end; if self.image8 ~= nil then self.image8:destroy(); self.image8 = nil; end; if self.comboBox18 ~= nil then self.comboBox18:destroy(); self.comboBox18 = nil; end; if self.comboBox1 ~= nil then self.comboBox1:destroy(); self.comboBox1 = nil; end; if self.label114 ~= nil then self.label114:destroy(); self.label114 = nil; end; if self.label197 ~= nil then self.label197:destroy(); self.label197 = nil; end; if self.edit253 ~= nil then self.edit253:destroy(); self.edit253 = nil; end; if self.flowPart5 ~= nil then self.flowPart5:destroy(); self.flowPart5 = nil; end; if self.label135 ~= nil then self.label135:destroy(); self.label135 = nil; end; if self.edit266 ~= nil then self.edit266:destroy(); self.edit266 = nil; end; if self.edit23 ~= nil then self.edit23:destroy(); self.edit23 = nil; end; if self.edit327 ~= nil then self.edit327:destroy(); self.edit327 = nil; end; if self.tab7 ~= nil then self.tab7:destroy(); self.tab7 = nil; end; if self.edit319 ~= nil then self.edit319:destroy(); self.edit319 = nil; end; if self.label56 ~= nil then self.label56:destroy(); self.label56 = nil; end; if self.edit280 ~= nil then self.edit280:destroy(); self.edit280 = nil; end; if self.label237 ~= nil then self.label237:destroy(); self.label237 = nil; end; if self.imageCheckBox1 ~= nil then self.imageCheckBox1:destroy(); self.imageCheckBox1 = nil; end; if self.edit122 ~= nil then self.edit122:destroy(); self.edit122 = nil; end; if self.dataLink49 ~= nil then self.dataLink49:destroy(); self.dataLink49 = nil; end; if self.edit40 ~= nil then self.edit40:destroy(); self.edit40 = nil; end; if self.textEditor6 ~= nil then self.textEditor6:destroy(); self.textEditor6 = nil; end; if self.edit110 ~= nil then self.edit110:destroy(); self.edit110 = nil; end; if self.dataLink2 ~= nil then self.dataLink2:destroy(); self.dataLink2 = nil; end; if self.textEditor12 ~= nil then self.textEditor12:destroy(); self.textEditor12 = nil; end; if self.edit325 ~= nil then self.edit325:destroy(); self.edit325 = nil; end; if self.edit38 ~= nil then self.edit38:destroy(); self.edit38 = nil; end; if self.dataLink15 ~= nil then self.dataLink15:destroy(); self.dataLink15 = nil; end; if self.edit123 ~= nil then self.edit123:destroy(); self.edit123 = nil; end; if self.label130 ~= nil then self.label130:destroy(); self.label130 = nil; end; if self.image22 ~= nil then self.image22:destroy(); self.image22 = nil; end; if self.layout49 ~= nil then self.layout49:destroy(); self.layout49 = nil; end; if self.edit322 ~= nil then self.edit322:destroy(); self.edit322 = nil; end; if self.edit206 ~= nil then self.edit206:destroy(); self.edit206 = nil; end; if self.label54 ~= nil then self.label54:destroy(); self.label54 = nil; end; if self.button60 ~= nil then self.button60:destroy(); self.button60 = nil; end; if self.richEdit1 ~= nil then self.richEdit1:destroy(); self.richEdit1 = nil; end; if self.label191 ~= nil then self.label191:destroy(); self.label191 = nil; end; if self.frmCreditos ~= nil then self.frmCreditos:destroy(); self.frmCreditos = nil; end; if self.dataLink37 ~= nil then self.dataLink37:destroy(); self.dataLink37 = nil; end; if self.scrollBox3 ~= nil then self.scrollBox3:destroy(); self.scrollBox3 = nil; end; if self.textEditor1 ~= nil then self.textEditor1:destroy(); self.textEditor1 = nil; end; if self.edit137 ~= nil then self.edit137:destroy(); self.edit137 = nil; end; if self.edit146 ~= nil then self.edit146:destroy(); self.edit146 = nil; end; if self.dataLink29 ~= nil then self.dataLink29:destroy(); self.dataLink29 = nil; end; if self.label152 ~= nil then self.label152:destroy(); self.label152 = nil; end; if self.button9 ~= nil then self.button9:destroy(); self.button9 = nil; end; if self.label182 ~= nil then self.label182:destroy(); self.label182 = nil; end; if self.edit6 ~= nil then self.edit6:destroy(); self.edit6 = nil; end; if self.imageCheckBox6 ~= nil then self.imageCheckBox6:destroy(); self.imageCheckBox6 = nil; end; if self.textEditor21 ~= nil then self.textEditor21:destroy(); self.textEditor21 = nil; end; if self.rectangle60 ~= nil then self.rectangle60:destroy(); self.rectangle60 = nil; end; if self.edit238 ~= nil then self.edit238:destroy(); self.edit238 = nil; end; if self.dataLink56 ~= nil then self.dataLink56:destroy(); self.dataLink56 = nil; end; if self.edit49 ~= nil then self.edit49:destroy(); self.edit49 = nil; end; if self.rectangle32 ~= nil then self.rectangle32:destroy(); self.rectangle32 = nil; end; if self.boxDetalhesDoItem ~= nil then self.boxDetalhesDoItem:destroy(); self.boxDetalhesDoItem = nil; end; if self.label62 ~= nil then self.label62:destroy(); self.label62 = nil; end; if self.label238 ~= nil then self.label238:destroy(); self.label238 = nil; end; if self.comboBox23 ~= nil then self.comboBox23:destroy(); self.comboBox23 = nil; end; if self.layout16 ~= nil then self.layout16:destroy(); self.layout16 = nil; end; if self.edit271 ~= nil then self.edit271:destroy(); self.edit271 = nil; end; if self.image18 ~= nil then self.image18:destroy(); self.image18 = nil; end; if self.edit18 ~= nil then self.edit18:destroy(); self.edit18 = nil; end; if self.edit25 ~= nil then self.edit25:destroy(); self.edit25 = nil; end; if self.dataLink25 ~= nil then self.dataLink25:destroy(); self.dataLink25 = nil; end; if self.edit189 ~= nil then self.edit189:destroy(); self.edit189 = nil; end; if self.edit94 ~= nil then self.edit94:destroy(); self.edit94 = nil; end; if self.edit167 ~= nil then self.edit167:destroy(); self.edit167 = nil; end; if self.label171 ~= nil then self.label171:destroy(); self.label171 = nil; end; if self.tab6 ~= nil then self.tab6:destroy(); self.tab6 = nil; end; if self.label123 ~= nil then self.label123:destroy(); self.label123 = nil; end; if self.label178 ~= nil then self.label178:destroy(); self.label178 = nil; end; if self.label272 ~= nil then self.label272:destroy(); self.label272 = nil; end; if self.button62 ~= nil then self.button62:destroy(); self.button62 = nil; end; if self.layout43 ~= nil then self.layout43:destroy(); self.layout43 = nil; end; if self.label316 ~= nil then self.label316:destroy(); self.label316 = nil; end; if self.edit229 ~= nil then self.edit229:destroy(); self.edit229 = nil; end; if self.rectangle56 ~= nil then self.rectangle56:destroy(); self.rectangle56 = nil; end; if self.textEditor13 ~= nil then self.textEditor13:destroy(); self.textEditor13 = nil; end; if self.label165 ~= nil then self.label165:destroy(); self.label165 = nil; end; if self.label174 ~= nil then self.label174:destroy(); self.label174 = nil; end; if self.dataLink39 ~= nil then self.dataLink39:destroy(); self.dataLink39 = nil; end; if self.button49 ~= nil then self.button49:destroy(); self.button49 = nil; end; if self.edit104 ~= nil then self.edit104:destroy(); self.edit104 = nil; end; if self.label113 ~= nil then self.label113:destroy(); self.label113 = nil; end; if self.label274 ~= nil then self.label274:destroy(); self.label274 = nil; end; if self.edit7 ~= nil then self.edit7:destroy(); self.edit7 = nil; end; if self.layout57 ~= nil then self.layout57:destroy(); self.layout57 = nil; end; if self.edit108 ~= nil then self.edit108:destroy(); self.edit108 = nil; end; if self.rectangle79 ~= nil then self.rectangle79:destroy(); self.rectangle79 = nil; end; if self.edit95 ~= nil then self.edit95:destroy(); self.edit95 = nil; end; if self.edit35 ~= nil then self.edit35:destroy(); self.edit35 = nil; end; if self.edit171 ~= nil then self.edit171:destroy(); self.edit171 = nil; end; if self.label26 ~= nil then self.label26:destroy(); self.label26 = nil; end; if self.layout65 ~= nil then self.layout65:destroy(); self.layout65 = nil; end; if self.comboBox4 ~= nil then self.comboBox4:destroy(); self.comboBox4 = nil; end; if self.edit351 ~= nil then self.edit351:destroy(); self.edit351 = nil; end; if self.dataLink59 ~= nil then self.dataLink59:destroy(); self.dataLink59 = nil; end; if self.edit97 ~= nil then self.edit97:destroy(); self.edit97 = nil; end; if self.image33 ~= nil then self.image33:destroy(); self.image33 = nil; end; if self.rectangle19 ~= nil then self.rectangle19:destroy(); self.rectangle19 = nil; end; if self.label121 ~= nil then self.label121:destroy(); self.label121 = nil; end; if self.rectangle22 ~= nil then self.rectangle22:destroy(); self.rectangle22 = nil; end; if self.label239 ~= nil then self.label239:destroy(); self.label239 = nil; end; if self.rectangle1 ~= nil then self.rectangle1:destroy(); self.rectangle1 = nil; end; if self.edit50 ~= nil then self.edit50:destroy(); self.edit50 = nil; end; if self.layout45 ~= nil then self.layout45:destroy(); self.layout45 = nil; end; if self.edit356 ~= nil then self.edit356:destroy(); self.edit356 = nil; end; if self.label64 ~= nil then self.label64:destroy(); self.label64 = nil; end; if self.edit344 ~= nil then self.edit344:destroy(); self.edit344 = nil; end; if self.label311 ~= nil then self.label311:destroy(); self.label311 = nil; end; if self.layout46 ~= nil then self.layout46:destroy(); self.layout46 = nil; end; if self.label173 ~= nil then self.label173:destroy(); self.label173 = nil; end; if self.image48 ~= nil then self.image48:destroy(); self.image48 = nil; end; if self.image57 ~= nil then self.image57:destroy(); self.image57 = nil; end; if self.edit89 ~= nil then self.edit89:destroy(); self.edit89 = nil; end; if self.label320 ~= nil then self.label320:destroy(); self.label320 = nil; end; if self.button34 ~= nil then self.button34:destroy(); self.button34 = nil; end; if self.tabControl2 ~= nil then self.tabControl2:destroy(); self.tabControl2 = nil; end; if self.edit317 ~= nil then self.edit317:destroy(); self.edit317 = nil; end; if self.frmAnotacoes ~= nil then self.frmAnotacoes:destroy(); self.frmAnotacoes = nil; end; if self.label136 ~= nil then self.label136:destroy(); self.label136 = nil; end; if self.image39 ~= nil then self.image39:destroy(); self.image39 = nil; end; if self.edit318 ~= nil then self.edit318:destroy(); self.edit318 = nil; end; if self.rectangle54 ~= nil then self.rectangle54:destroy(); self.rectangle54 = nil; end; if self.rectangle25 ~= nil then self.rectangle25:destroy(); self.rectangle25 = nil; end; if self.label74 ~= nil then self.label74:destroy(); self.label74 = nil; end; if self.image24 ~= nil then self.image24:destroy(); self.image24 = nil; end; if self.dataLink41 ~= nil then self.dataLink41:destroy(); self.dataLink41 = nil; end; if self.dataLink19 ~= nil then self.dataLink19:destroy(); self.dataLink19 = nil; end; if self.label149 ~= nil then self.label149:destroy(); self.label149 = nil; end; if self.edit148 ~= nil then self.edit148:destroy(); self.edit148 = nil; end; if self.button50 ~= nil then self.button50:destroy(); self.button50 = nil; end; if self.button48 ~= nil then self.button48:destroy(); self.button48 = nil; end; if self.dataLink36 ~= nil then self.dataLink36:destroy(); self.dataLink36 = nil; end; if self.image40 ~= nil then self.image40:destroy(); self.image40 = nil; end; if self.label249 ~= nil then self.label249:destroy(); self.label249 = nil; end; if self.layout28 ~= nil then self.layout28:destroy(); self.layout28 = nil; end; if self.edit232 ~= nil then self.edit232:destroy(); self.edit232 = nil; end; if self.dataLink17 ~= nil then self.dataLink17:destroy(); self.dataLink17 = nil; end; if self.layout19 ~= nil then self.layout19:destroy(); self.layout19 = nil; end; if self.label9 ~= nil then self.label9:destroy(); self.label9 = nil; end; if self.rectangle8 ~= nil then self.rectangle8:destroy(); self.rectangle8 = nil; end; if self.edit217 ~= nil then self.edit217:destroy(); self.edit217 = nil; end; if self.label157 ~= nil then self.label157:destroy(); self.label157 = nil; end; if self.edit234 ~= nil then self.edit234:destroy(); self.edit234 = nil; end; if self.edit272 ~= nil then self.edit272:destroy(); self.edit272 = nil; end; if self.label219 ~= nil then self.label219:destroy(); self.label219 = nil; end; if self.label208 ~= nil then self.label208:destroy(); self.label208 = nil; end; if self.edit306 ~= nil then self.edit306:destroy(); self.edit306 = nil; end; if self.frmPokedex ~= nil then self.frmPokedex:destroy(); self.frmPokedex = nil; end; if self.edit30 ~= nil then self.edit30:destroy(); self.edit30 = nil; end; if self.button57 ~= nil then self.button57:destroy(); self.button57 = nil; end; if self.edit290 ~= nil then self.edit290:destroy(); self.edit290 = nil; end; if self.BotaoSAB ~= nil then self.BotaoSAB:destroy(); self.BotaoSAB = nil; end; if self.edit197 ~= nil then self.edit197:destroy(); self.edit197 = nil; end; if self.comboBox25 ~= nil then self.comboBox25:destroy(); self.comboBox25 = nil; end; if self.edit55 ~= nil then self.edit55:destroy(); self.edit55 = nil; end; if self.edit307 ~= nil then self.edit307:destroy(); self.edit307 = nil; end; if self.label118 ~= nil then self.label118:destroy(); self.label118 = nil; end; if self.label17 ~= nil then self.label17:destroy(); self.label17 = nil; end; if self.label156 ~= nil then self.label156:destroy(); self.label156 = nil; end; if self.edit75 ~= nil then self.edit75:destroy(); self.edit75 = nil; end; if self.edit193 ~= nil then self.edit193:destroy(); self.edit193 = nil; end; if self.edit65 ~= nil then self.edit65:destroy(); self.edit65 = nil; end; if self.edit130 ~= nil then self.edit130:destroy(); self.edit130 = nil; end; if self.dataLink66 ~= nil then self.dataLink66:destroy(); self.dataLink66 = nil; end; if self.edit39 ~= nil then self.edit39:destroy(); self.edit39 = nil; end; if self.layout53 ~= nil then self.layout53:destroy(); self.layout53 = nil; end; if self.edit337 ~= nil then self.edit337:destroy(); self.edit337 = nil; end; if self.imageCheckBox5 ~= nil then self.imageCheckBox5:destroy(); self.imageCheckBox5 = nil; end; if self.label168 ~= nil then self.label168:destroy(); self.label168 = nil; end; if self.rectangle69 ~= nil then self.rectangle69:destroy(); self.rectangle69 = nil; end; if self.label204 ~= nil then self.label204:destroy(); self.label204 = nil; end; if self.dataLink52 ~= nil then self.dataLink52:destroy(); self.dataLink52 = nil; end; if self.label241 ~= nil then self.label241:destroy(); self.label241 = nil; end; if self.button12 ~= nil then self.button12:destroy(); self.button12 = nil; end; if self.label36 ~= nil then self.label36:destroy(); self.label36 = nil; end; if self.comboBox9 ~= nil then self.comboBox9:destroy(); self.comboBox9 = nil; end; if self.edit203 ~= nil then self.edit203:destroy(); self.edit203 = nil; end; if self.image17 ~= nil then self.image17:destroy(); self.image17 = nil; end; if self.dataLink26 ~= nil then self.dataLink26:destroy(); self.dataLink26 = nil; end; if self.edit151 ~= nil then self.edit151:destroy(); self.edit151 = nil; end; if self.edit292 ~= nil then self.edit292:destroy(); self.edit292 = nil; end; if self.edit132 ~= nil then self.edit132:destroy(); self.edit132 = nil; end; if self.label294 ~= nil then self.label294:destroy(); self.label294 = nil; end; if self.rclConsumiveis ~= nil then self.rclConsumiveis:destroy(); self.rclConsumiveis = nil; end; if self.edit188 ~= nil then self.edit188:destroy(); self.edit188 = nil; end; if self.progressBar6 ~= nil then self.progressBar6:destroy(); self.progressBar6 = nil; end; if self.comboBox8 ~= nil then self.comboBox8:destroy(); self.comboBox8 = nil; end; if self.label226 ~= nil then self.label226:destroy(); self.label226 = nil; end; if self.edit119 ~= nil then self.edit119:destroy(); self.edit119 = nil; end; if self.label218 ~= nil then self.label218:destroy(); self.label218 = nil; end; if self.label46 ~= nil then self.label46:destroy(); self.label46 = nil; end; if self.dataLink48 ~= nil then self.dataLink48:destroy(); self.dataLink48 = nil; end; if self.button25 ~= nil then self.button25:destroy(); self.button25 = nil; end; if self.imageCheckBox3 ~= nil then self.imageCheckBox3:destroy(); self.imageCheckBox3 = nil; end; if self.edit168 ~= nil then self.edit168:destroy(); self.edit168 = nil; end; if self.label183 ~= nil then self.label183:destroy(); self.label183 = nil; end; if self.frmBackground ~= nil then self.frmBackground:destroy(); self.frmBackground = nil; end; if self.edit78 ~= nil then self.edit78:destroy(); self.edit78 = nil; end; if self.label87 ~= nil then self.label87:destroy(); self.label87 = nil; end; if self.label104 ~= nil then self.label104:destroy(); self.label104 = nil; end; if self.edit91 ~= nil then self.edit91:destroy(); self.edit91 = nil; end; if self.label25 ~= nil then self.label25:destroy(); self.label25 = nil; end; if self.BotaoCON ~= nil then self.BotaoCON:destroy(); self.BotaoCON = nil; end; if self.button46 ~= nil then self.button46:destroy(); self.button46 = nil; end; if self.dataLink51 ~= nil then self.dataLink51:destroy(); self.dataLink51 = nil; end; if self.edit22 ~= nil then self.edit22:destroy(); self.edit22 = nil; end; if self.dataLink88 ~= nil then self.dataLink88:destroy(); self.dataLink88 = nil; end; if self.label5 ~= nil then self.label5:destroy(); self.label5 = nil; end; if self.layout6 ~= nil then self.layout6:destroy(); self.layout6 = nil; end; if self.rectangle13 ~= nil then self.rectangle13:destroy(); self.rectangle13 = nil; end; if self.progressBar1 ~= nil then self.progressBar1:destroy(); self.progressBar1 = nil; end; if self.label141 ~= nil then self.label141:destroy(); self.label141 = nil; end; if self.label296 ~= nil then self.label296:destroy(); self.label296 = nil; end; if self.label277 ~= nil then self.label277:destroy(); self.label277 = nil; end; if self.button19 ~= nil then self.button19:destroy(); self.button19 = nil; end; if self.image43 ~= nil then self.image43:destroy(); self.image43 = nil; end; if self.label243 ~= nil then self.label243:destroy(); self.label243 = nil; end; if self.edit227 ~= nil then self.edit227:destroy(); self.edit227 = nil; end; if self.image21 ~= nil then self.image21:destroy(); self.image21 = nil; end; if self.edit20 ~= nil then self.edit20:destroy(); self.edit20 = nil; end; self:_oldLFMDestroy(); end; obj:endUpdate(); return obj; end; function newfrmHITOPOKEPTAOLD() local retObj = nil; __o_rrpgObjs.beginObjectsLoading(); __o_Utils.tryFinally( function() retObj = constructNew_frmHITOPOKEPTAOLD(); end, function() __o_rrpgObjs.endObjectsLoading(); end); assert(retObj ~= nil); return retObj; end; local _frmHITOPOKEPTAOLD = { newEditor = newfrmHITOPOKEPTAOLD, new = newfrmHITOPOKEPTAOLD, name = "frmHITOPOKEPTAOLD", dataType = "HITO_PLAYER_POKEPTAOLD", formType = "sheetTemplate", formComponentName = "form", title = "Hitoshura - Pokemon PTA (Antigo)", description=""}; frmHITOPOKEPTAOLD = _frmHITOPOKEPTAOLD; Firecast.registrarForm(_frmHITOPOKEPTAOLD); Firecast.registrarDataType(_frmHITOPOKEPTAOLD); return _frmHITOPOKEPTAOLD;
local function createButton(id, parent, text, tooltipText, width, callback) width = width or 120 tooltipText = tooltipText or "" parent:CreateComponent(id, "ui/templates/square_medium_text_button_toggle") local button = UIComponent(parent:Find(id)) local buttonText = find_uicomponent(button, "dy_province") parent:Adopt(button:Address()) button:PropagatePriority(parent:Priority()) button:ResizeTextResizingComponentToInitialSize(width, button:Height()) buttonText:SetStateText(text) buttonText:SetTooltipText(tooltipText, true) if type(callback) == "function" then local listenerName = id .. "_Listener" core:add_listener( listenerName, "ComponentLClickUp", function(context) return button == UIComponent(context.component) end, callback, true ) end return button end return createButton
if not modules then modules = { } end modules ['node-snp'] = { version = 1.001, comment = "companion to node-ini.mkiv", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files" } if not nodes then nodes = { } -- also loaded in mtx-timing end local snapshots = { } nodes.snapshots = snapshots local nodeusage = nodes.pool and nodes.pool.usage local clock = os.gettimeofday or os.clock -- should go in environment local lasttime = clock() local samples = { } local parameters = { "cs_count", "dyn_used", "elapsed_time", "luabytecode_bytes", "luastate_bytes", "max_buf_stack", "obj_ptr", "pdf_mem_ptr", "pdf_mem_size", "pdf_os_cntr", -- "pool_ptr", -- obsolete "str_ptr", } function snapshots.takesample(comment) if nodeusage then local c = clock() local t = { elapsed_time = c - lasttime, node_memory = nodeusage(), comment = comment, } for i=1,#parameters do local parameter = parameters[i] local ps = status[parameter] if ps then t[parameter] = ps end end samples[#samples+1] = t lasttime = c end end function snapshots.getsamples() return samples -- one return value ! end function snapshots.resetsamples() samples = { } end function snapshots.getparameters() return parameters end
-- Copyright 2020 Andrew Howe -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may not -- use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -- WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -- License for the specific language governing permissions and limitations under -- the License. -- -- -- decrement_per_var.lua: Decrements persistent storage variables individually -- v1.0 -- Written by Andrew Howe (andrew.howe@loadbalancer.org) -- function main() -- Get the name of the variable to be decremented local var_name = m.getvar("TX.var_name"); -- Test if it's possible to get the specified variable and, if not (it -- isn't set yet or the user mistyped its name), then return if not (m.getvar(var_name)) then return nil; end -- Get the value of the specified variable local var_value = tonumber(m.getvar(var_name)); -- If the variable's value is 0 then there's nothing to do if (var_value == 0) then return nil; end -- Get the time interval (seconds) between each decrement action local dec_interval = tonumber(m.getvar("TX.dec_interval")); -- Get the amount to decrement by each time local dec_amount = tonumber(m.getvar("TX.dec_amount")); -- Get the current Unix time and store it as a variable local current_time = tonumber(m.getvar("TIME_EPOCH")); -- Test if it's possible to get the variable's timestamp and, if not, -- set one (equal to the current time) and then return if not (m.getvar(var_name .. "_LAST_UPDATE_TIME")) then m.setvar(var_name .. "_LAST_UPDATE_TIME", current_time); return nil; end -- Get the timestamp of when the specified variable was last updated local last_update_time = tonumber(m.getvar(var_name .. "_LAST_UPDATE_TIME")); -- Calculate the number of seconds since the variable was last updated local time_since_update = current_time - last_update_time; -- Test if the time since last update >= interval between decrements if time_since_update >= dec_interval then -- Calculate by how much the variable needs to be decremented local total_dec_amount = math.floor(time_since_update / dec_interval) * dec_amount; var_value = var_value - total_dec_amount; -- Don't give negative results (interpreted as 'x-=var_value') if (var_value < 0) then var_value = 0; end -- Set the variable to its new, decremented value m.setvar(var_name, var_value); -- Update the variable's 'last updated' timestamp m.setvar(var_name .. "_LAST_UPDATE_TIME", current_time); end return nil; end
-- display navigation only, if user is logged in if app.session.user_id == nil then execute.inner() return end slot.select("topnav", function() ui.link{ attr = { class = "nav" }, text = _"Home", module = "index", view = "index" } ui.link{ attr = { class = "nav" }, text = _"Media", module = "medium" } ui.link{ attr = { class = "nav" }, text = _"Media types", module = "media_type" } ui.link{ attr = { class = "nav" }, text = _"Genres", module = "genre" } if app.session.user.admin then ui.link{ attr = { class = "nav" }, text = _"Users", module = "user" } end ui.container{ attr = { class = "nav lang_chooser" }, content = function() for i, lang in ipairs{"en", "de", "es"} do ui.container{ content = function() ui.link{ content = function() ui.image{ static = "lang/" .. lang .. ".png", attr = { alt = lang } } slot.put(lang) end, module = "index", action = "set_lang", params = { lang = lang }, routing = { default = { mode = "redirect", module = request.get_module(), view = request.get_view(), id = request.get_id_string(), params = request.get_param_strings() } } } end } end end } ui.link{ attr = { class = "nav" }, text = _"Logout", module = "index", action = "logout", redirect_to = { ok = { module = "index", view = "login" } } } end) execute.inner()
-- -- code derived from https://github.com/soumith/dcgan.torch -- local util = {} require 'torch' function util.normalize(img) -- rescale image to 0 .. 1 local min = img:min() local max = img:max() img = torch.FloatTensor(img:size()):copy(img) img:add(-min):mul(1/(max-min)) return img end function util.normalizeBatch(batch) for i = 1, batch:size(1) do batch[i] = util.normalize(batch[i]:squeeze()) end return batch end function util.basename_batch(batch) for i = 1, #batch do batch[i] = paths.basename(batch[i]) end return batch end -- default preprocessing -- -- Preprocesses an image before passing it to a net -- Converts from RGB to BGR and rescales from [0,1] to [-1,1] function util.preprocess(img) -- RGB to BGR local perm = torch.LongTensor{3, 2, 1} img = img:index(1, perm) -- [0,1] to [-1,1] img = img:mul(2):add(-1) -- check that input is in expected range assert(img:max()<=1,"badly scaled inputs") assert(img:min()>=-1,"badly scaled inputs") return img end -- Undo the above preprocessing. function util.deprocess(img) -- BGR to RGB local perm = torch.LongTensor{3, 2, 1} img = img:index(1, perm) -- [-1,1] to [0,1] img = img:add(1):div(2) return img end function util.preprocess_batch(batch) for i = 1, batch:size(1) do batch[i] = util.preprocess(batch[i]:squeeze()) end return batch end function util.deprocess_batch(batch) for i = 1, batch:size(1) do batch[i] = util.deprocess(batch[i]:squeeze()) end return batch end -- preprocessing specific to colorization function util.deprocessLAB(L, AB) local L2 = torch.Tensor(L:size()):copy(L) if L2:dim() == 3 then L2 = L2[{1, {}, {} }] end local AB2 = torch.Tensor(AB:size()):copy(AB) AB2 = torch.clamp(AB2, -1.0, 1.0) -- local AB2 = AB L2 = L2:add(1):mul(50.0) AB2 = AB2:mul(110.0) L2 = L2:reshape(1, L2:size(1), L2:size(2)) im_lab = torch.cat(L2, AB2, 1) im_rgb = torch.clamp(image.lab2rgb(im_lab):mul(255.0), 0.0, 255.0)/255.0 return im_rgb end function util.deprocessL(L) local L2 = torch.Tensor(L:size()):copy(L) L2 = L2:add(1):mul(255.0/2.0) if L2:dim()==2 then L2 = L2:reshape(1,L2:size(1),L2:size(2)) end L2 = L2:repeatTensor(L2,3,1,1)/255.0 return L2 end function util.deprocessL_batch(batch) local batch_new = {} for i = 1, batch:size(1) do batch_new[i] = util.deprocessL(batch[i]:squeeze()) end return batch_new end function util.deprocessLAB_batch(batchL, batchAB) local batch = {} for i = 1, batchL:size(1) do batch[i] = util.deprocessLAB(batchL[i]:squeeze(), batchAB[i]:squeeze()) end return batch end function util.scaleBatch(batch,s1,s2) local scaled_batch = torch.Tensor(batch:size(1),batch:size(2),s1,s2) for i = 1, batch:size(1) do scaled_batch[i] = image.scale(batch[i],s1,s2):squeeze() end return scaled_batch end function util.toTrivialBatch(input) return input:reshape(1,input:size(1),input:size(2),input:size(3)) end function util.fromTrivialBatch(input) return input[1] end function util.scaleImage(input, loadSize) -- replicate bw images to 3 channels if input:size(1)==1 then input = torch.repeatTensor(input,3,1,1) end input = image.scale(input, loadSize, loadSize) return input end function util.getAspectRatio(path) local input = image.load(path, 3, 'float') local ar = input:size(3)/input:size(2) return ar end function util.loadImage(path, loadSize, nc) local input = image.load(path, 3, 'float') input= util.preprocess(util.scaleImage(input, loadSize)) if nc == 1 then input = input[{{1}, {}, {}}] end return input end -- TO DO: loading code is rather hacky; clean it up and make sure it works on all types of nets / cpu/gpu configurations function util.load(filename, opt) if opt.cudnn>0 then require 'cudnn' end if opt.gpu > 0 then require 'cunn' end local net = torch.load(filename) if opt.gpu > 0 then net:cuda() -- calling cuda on cudnn saved nngraphs doesn't change all variables to cuda, so do it below if net.forwardnodes then for i=1,#net.forwardnodes do if net.forwardnodes[i].data.module then net.forwardnodes[i].data.module:cuda() end end end else net:float() end net:apply(function(m) if m.weight then m.gradWeight = m.weight:clone():zero(); m.gradBias = m.bias:clone():zero(); end end) return net end function util.cudnn(net) require 'cudnn' require 'util/cudnn_convert_custom' return cudnn_convert_custom(net, cudnn) end function util.containsValue(table, value) for k, v in pairs(table) do if v == value then return true end end return false end return util
local AddonName, AddonTable = ... AddonTable.mechanar = { -- Mechano-Lord Capacitus 28253, 28257, 28254, 28255, 28256, -- Nethermancer Sepethrea 28263, 28260, 28275, 28262, 28202, 28259, -- Pathaleon the Calculator 28267, 27899, 29362, 28286, 28285, 28278, 28269, 28204, 32076, 28266, 30533, 29251, 28265, 28288, }
return { default = { terminal = "alacritty", broswer = "firefox --new-tab", app_launcher = "rofi -combi-modi window,drun -show combi -modi combi -theme ~/.config/rofi/apps.css", }, }
local labels = { 'alert', 'clearthroat', 'cough', 'doorslam', 'drawer', 'keyboard', 'keys', 'knock', 'laughter', 'mouse', 'pageturn', 'pendrop', 'phone', 'printer', 'speech', 'switch' -- 'none' } mdl:evaluate() local conf = optim.ConfusionMatrix(labels) conf:zero() local valError = 0 local valSize = torch.floor(#valClassSuperFrames/batchSize) local time = sys.clock() for i=1,valSize do local batch, targets = getValSample(i) local oHat = mdl:forward(batch) conf:batchAdd(oHat,targets) valError = valError + criterion:forward(oHat,targets) if i == valSize then cvError[epoch] = valError/valSize local errStr = string.format(' Cross Val Error: %g\n',valError/valSize) print(errStr) local logFile = io.open(string.format('logs/model%d.err',nModel),'a') -- logFile:open() logFile:write(errStr) logFile:close() end end -- print(conf) image.save('conf.png',conf:render()) time = sys.clock() - time print("<validation> time for CrosVal = " .. (time) .. 's') epoch = epoch + 1 torch.seed() collectgarbage()
megaBuster = entity:extend() function megaBuster:new(x, y, dir, wpn) megaBuster.super.new(self) self.transform.y = y self.transform.x = x self:setRectangleCollision(8, 6) self.tex = loader.get("buster_tex") self.quad = love.graphics.newQuad(0, 31, 8, 6, 133, 47) self:addToGroup("megaBuster") self:addToGroup("freezable") self:addToGroup("removeOnCutscene") self.dink = false self.velocity = velocity() self.velocity.velx = dir * 5 self.side = dir self.wpn = wpn self:setLayer(1) mmSfx.play("buster") end function megaBuster:update(dt) if not self.dink then self:hurt(self:collisionTable(megautils.groups()["hurtable"]), -1, 2) else self.velocity.vely = -4 self.velocity.velx = 4*-self.side end self:moveBy(self.velocity.velx, self.velocity.vely) if megautils.outside(self) or (self.wpn.currentSlot ~= 0 and self.wpn.currentSlot ~= 9 and self.wpn.currentSlot ~= 10) then megautils.remove(self, true) end end function megaBuster:draw() love.graphics.setColor(1, 1, 1, 1) love.graphics.draw(self.tex, self.quad, math.round(self.transform.x), math.round(self.transform.y)) end megaSemiBuster = entity:extend() function megaSemiBuster:new(x, y, dir, wpn) megaSemiBuster.super.new(self) self.transform.y = y self.transform.x = x self:setRectangleCollision(16, 10) self.tex = loader.get("buster_tex") self.anim = anim8.newAnimation(loader.get("small_charge_grid")("1-2", 1), 1/12) self:addToGroup("megaBuster") self:addToGroup("freezable") self:addToGroup("removeOnCutscene") self.dink = false self.velocity = velocity() self.velocity.velx = dir * 5 self.side = dir self.wpn = wpn mmSfx.play("semi_charged") self:face(-self.side) self:setLayer(1) end function megaSemiBuster:face(n) self.anim.flippedH = (n == 1) and true or false end function megaSemiBuster:update(dt) self.anim:update(1/60) if not self.dink then self:hurt(self:collisionTable(megautils.groups()["hurtable"]), -1, 2) else self.velocity.vely = -4 self.velocity.velx = 4*-self.side end self:moveBy(self.velocity.velx, self.velocity.vely) if megautils.outside(self) or self.wpn.currentSlot ~= 0 then megautils.remove(self, true) end end function megaSemiBuster:draw() love.graphics.setColor(1, 1, 1, 1) self.anim:draw(self.tex, math.round(self.transform.x), math.round(self.transform.y)-3) end megaChargedBuster = entity:extend() function megaChargedBuster:new(x, y, dir, wpn) megaChargedBuster.super.new(self) self.tex = loader.get("buster_tex") self.anim = anim8.newAnimation(loader.get("charge_grid")("1-4", 1), 1/20) self.transform.y = y self.transform.x = x self:setRectangleCollision(24, 24) self:addToGroup("megaChargedBuster") self:addToGroup("freezable") self:addToGroup("removeOnCutscene") self.dink = false self.velocity = velocity() self.spd = 4 self.velocity.velx = dir * 5.5 self.side = dir self.wpn = wpn mmSfx.play("charged") self:face(-self.side) self:setLayer(1) end function megaChargedBuster:face(n) self.anim.flippedH = (n == 1) and true or false end function megaChargedBuster:update(dt) self.anim:update(1/60) if not self.dink then self:hurt(self:collisionTable(megautils.groups()["hurtable"]), -2, 2) else self.velocity.vely = -4 self.velocity.velx = 4*-self.side end self:moveBy(self.velocity.velx, self.velocity.vely) if megautils.outside(self) or self.wpn.currentSlot ~= 0 then megautils.remove(self, true) end end function megaChargedBuster:draw() love.graphics.setColor(1, 1, 1, 1) self.anim:draw(self.tex, math.round(self.transform.x)-8, math.round(self.transform.y)-3) end rushJet = entity:extend() function rushJet:new(x, y, side, w) rushJet.super.new(self) self.transform.x = x self.transform.y = view.y-8 self.toY = y self:setRectangleCollision(27, 8) self.tex = loader.get("rush") self.c = "spawn" self.anims = {} self.anims["spawn"] = anim8.newAnimation(loader.get("rush_grid")(1, 1), 1) self.anims["spawn_land"] = anim8.newAnimation(loader.get("rush_grid")("2-3", 1, 2, 1), 1/20) self.anims["jet"] = anim8.newAnimation(loader.get("rush_grid")("2-3", 2), 1/8) self:addToGroup("rushJet") self:addToGroup("freezable") self:addToGroup("removeOnCutscene") self.side = side self.s = 0 self.velocity = velocity() self.wpn = w self.timer = 0 self:setLayer(2) self:setUpdateLayer(-1) end function rushJet:solid(x, y, d) return #self:collisionTable(megautils.groups()["solid"], x, y) ~= 0 or (ternary(d~=nil, d, true) and #self:collisionTable(megautils.groups()["death"], x, y)) ~= 0 or #oneway.collisionTable(self, megautils.groups()["oneway"], x, y) ~= 0 or #self:collisionTable(megautils.groups()["movingSolid"], x, y) ~= 0 end function rushJet:face(n) self.anims[self.c].flippedH = (n ~= 1) and true or false end function rushJet:phys() self:resetCollisionChecks() slope.blockFromGroup(self, megautils.groups()["slope"], self.velocity.velx, self.velocity.vely) self:block(self.velocity) oneway.blockFromGroup(self, megautils.groups()["oneway"], self.velocity.vely) self:block(self.velocity) solid.blockFromGroup(self, table.merge({megautils.groups()["solid"], megautils.groups()["death"]}), self.velocity.velx, self.velocity.vely) self:block(self.velocity) self:moveBy(self.velocity.velx, self.velocity.vely) end function rushJet:checkGround() local tmp = table.merge({self:collisionTable(megautils.groups()["solid"], 0, 1), self:collisionTable(megautils.groups()["death"], 0, 1), oneway.collisionTable(self, megautils.groups()["oneway"], 0, 1), self:collisionTable(megautils.groups()["movingSolid"], 0, 1)}) local result = false for k, v in ipairs(tmp) do if self.transform.y == v.transform.y - self.collisionShape.h then result = true break end end return result end function rushJet:update(dt) self.anims[self.c]:update(1/60) if self.s == -1 then self:moveBy(0, 8) elseif self.s == 0 then self.transform.y = math.min(self.transform.y+8, self.toY) if self.transform.y == self.toY then if not (self:solid(0, 0) or #self:collisionTable(megautils.groups()["slope"]) ~= 0) then self.c = "spawn_land" self.s = 1 else self.s = -1 end end elseif self.s == 1 then if self.anims["spawn_land"].looped then mmSfx.play("start") self.c = "jet" self.s = 2 end elseif self.s == 2 then if globals.mainPlayer ~= nil and globals.mainPlayer.velocity ~= nil and oneway.collision(globals.mainPlayer, self, globals.mainPlayer.velocity.velx, globals.mainPlayer.velocity.vely+1) then self.s = 3 self.velocity.velx = self.side self.user = globals.mainPlayer self.user.canWalk = false end self:moveBy(self.velocity.velx, self.velocity.vely) movingOneway.shift(self, megautils.groups()["carry"]) elseif self.s == 3 then if self.user ~= nil then if control.upDown then self.velocity.vely = -1 elseif control.downDown and not (self:checkGround() or self.onSlope) then self.velocity.vely = 1 else self.velocity.vely = 0 end else self.velocity.vely = 0 if globals.mainPlayer ~= nil and globals.mainPlayer.velocity ~= nil and oneway.collision(globals.mainPlayer, self, globals.mainPlayer.velocity.velx, globals.mainPlayer.velocity.vely+1) then self.velocity.velx = self.side self.user = globals.mainPlayer self.user.canWalk = false end end local dx, dy = self.transform.x, self.transform.y self:phys() local lvx, lvy = self.velocity.velx, self.velocity.vely self.velocity.velx = self.transform.x - dx self.velocity.vely = self.transform.y - dy movingOneway.shift(self, megautils.groups()["carry"]) self.velocity.velx = lvx self.velocity.vely = lvy if self.user ~= nil and not self.user:collision(self, 0, 1) then self.user.canWalk = true self.user = nil end if self.collisionChecks.leftWall or self.collisionChecks.rightWall or (self.user ~= nil and self:solid(0, -self.user.collisionShape.h-4)) then if self.user ~= nil then self.user.canWalk = true self.user.onMovingFloor = false end self.c = "spawn_land" self.anims["spawn_land"]:gotoFrame(1) self.s = 4 mmSfx.play("ascend") end self.timer = math.min(self.timer+1, 60) if self.timer == 60 then self.timer = 0 self.wpn.energy[self.wpn.currentSlot] = self.wpn.energy[self.wpn.currentSlot] - 1 end elseif self.s == 4 then if self.anims["spawn_land"].looped then self.s = 5 self.c = "spawn" end elseif self.s == 5 then self:moveBy(0, -8) end self:face(self.side) if megautils.outside(self) or self.wpn.currentSlot ~= 10 then megautils.remove(self, true) end end function rushJet:removed() if self.user ~= nil then self.user.canWalk = true end movingOneway.clean(self) end function rushJet:draw() love.graphics.setColor(1, 1, 1, 1) if self.c == "spawn" or self.c == "spawn_land" then self.anims[self.c]:draw(self.tex, math.round(self.transform.x-4), math.round(self.transform.y-16)) else self.anims[self.c]:draw(self.tex, math.round(self.transform.x-4), math.round(self.transform.y-12)) end end rushCoil = entity:extend() function rushCoil:new(x, y, side, w) rushCoil.super.new(self) self.transform.x = x self.transform.y = view.y-16 self.toY = y self:setRectangleCollision(20, 19) self.tex = loader.get("rush") self.c = "spawn" self.anims = {} self.anims["spawn"] = anim8.newAnimation(loader.get("rush_grid")(1, 1), 1) self.anims["spawn_land"] = anim8.newAnimation(loader.get("rush_grid")("2-3", 1, 2, 1), 1/20) self.anims["idle"] = anim8.newAnimation(loader.get("rush_grid")(4, 1, 1, 2), 1/8) self.anims["coil"] = anim8.newAnimation(loader.get("rush_grid")(4, 2), 1) self:addToGroup("rushCoil") self:addToGroup("freezable") self:addToGroup("removeOnCutscene") self.side = side self.s = 0 self.timer = 0 self.velocity = velocity() self.wpn = w self:setLayer(2) end function rushCoil:solid(x, y, d) return #self:collisionTable(megautils.groups()["solid"], x, y) ~= 0 or (ternary(d~=nil, d, true) and #self:collisionTable(megautils.groups()["death"], x, y)) ~= 0 or #oneway.collisionTable(self, megautils.groups()["oneway"], x, y) ~= 0 or #self:collisionTable(megautils.groups()["movingSolid"], x, y) ~= 0 end function rushCoil:phys() self:resetCollisionChecks() slope.blockFromGroup(self, megautils.groups()["slope"], self.velocity.velx, self.velocity.vely) self:block(self.velocity) oneway.blockFromGroup(self, megautils.groups()["oneway"], self.velocity.vely) self:block(self.velocity) solid.blockFromGroup(self, table.merge({megautils.groups()["solid"], megautils.groups()["death"]}), self.velocity.velx, self.velocity.vely) self:block(self.velocity) self:moveBy(self.velocity.velx, self.velocity.vely) end function rushCoil:face(n) self.anims[self.c].flippedH = (n ~= 1) and true or false end function rushCoil:update(dt) self.anims[self.c]:update(1/60) if self.s == -1 then self:moveBy(0, 8) elseif self.s == 0 then self.transform.y = math.min(self.transform.y+8, self.toY) if self.transform.y == self.toY then if not (self:solid(0, 0) or #self:collisionTable(megautils.groups()["slope"]) ~= 0) then self.s = 1 self.velocity.vely = 8 else self.s = -1 end end elseif self.s == 1 then self:phys() if self.collisionChecks.ground then self.c = "spawn_land" self.s = 2 end elseif self.s == 2 then if self.anims["spawn_land"].looped then mmSfx.play("start") self.c = "idle" self.s = 3 end elseif self.s == 3 then if globals.mainPlayer ~= nil then if not globals.mainPlayer.climb and globals.mainPlayer.velocity.vely > 0 and math.between(globals.mainPlayer.transform.x+globals.mainPlayer.collisionShape.w/2, self.transform.x, self.transform.x+self.collisionShape.w) and globals.mainPlayer:collision(self) then globals.mainPlayer.canStopJump = false globals.mainPlayer.velocity.vely = -10.5 globals.mainPlayer.step = false globals.mainPlayer.stepTime = 0 globals.mainPlayer.ground = false globals.mainPlayer.currentLadder = nil globals.mainPlayer.wallJumping = false globals.mainPlayer.dashJump = false if globals.mainPlayer.slide then local lh = self.collisionShape.h globals.mainPlayer:regBox() globals.mainPlayer.transform.y = globals.mainPlayer.transform.y - (globals.mainPlayer.collisionShape.h - lh) globals.mainPlayer.slide = false end self.s = 4 self.c = "coil" self.wpn.energy[self.wpn.currentSlot] = self.wpn.energy[self.wpn.currentSlot] - 7 end end elseif self.s == 4 then self.timer = math.min(self.timer+1, 40) if self.timer == 40 then self.s = 5 self.c = "spawn_land" self.anims["spawn_land"]:gotoFrame(1) mmSfx.play("ascend") end elseif self.s == 5 then if self.anims["spawn_land"].looped then self.s = 6 self.c = "spawn" end elseif self.s == 6 then self:moveBy(0, -8) end self:face(self.side) if megautils.outside(self) or self.wpn.currentSlot ~= 9 then megautils.remove(self, true) end end function rushCoil:draw() love.graphics.setColor(1, 1, 1, 1) self.anims[self.c]:draw(self.tex, math.round(self.transform.x-8), math.round(self.transform.y-12)) end stickWeapon = entity:extend() function stickWeapon:new(x, y, dir, wpn) stickWeapon.super.new(self) self.transform.y = y self.transform.x = x self:setRectangleCollision(8, 6) self.tex = loader.get("stick_weapon") self:addToGroup("stickWeapon") self:addToGroup("freezable") self:addToGroup("removeOnCutscene") self.dink = false self.velocity = velocity() self.velocity.velx = dir * 5 self.side = dir self.wpn = wpn self:setLayer(1) mmSfx.play("buster") end function stickWeapon:update(dt) if not self.dink then self:hurt(self:collisionTable(megautils.groups()["hurtable"]), -8, 1) else self.velocity.vely = -4 self.velocity.velx = 4*-self.side end self:moveBy(self.velocity.velx, self.velocity.vely) if megautils.outside(self) or self.wpn.currentSlot ~= 1 then megautils.remove(self, true) end end function stickWeapon:draw() love.graphics.setColor(1, 1, 1, 1) love.graphics.draw(self.tex, math.round(self.transform.x), math.round(self.transform.y)) end
local skynet = require "skynet" local M = {} function M:init() self.account_tbl = {} end function M:register(info) if self.account_tbl[info.account] then return {err = "account exist"} end local acc = { account = info.account, password = info.password, nickname = tostring(os.time()) } self.account_tbl[info.account] = acc skynet.send("mongo", "lua", "create", acc) return { err = "success", } end function M:login(info) local acc = self.account_tbl[info.account] if not acc then return {err="account not exist"} end if acc.password ~= info.password then return {err="wrong password"} end return { err = "success" } end return M
require 'optim' require 'eladtools' require 'nn' require 'recurrent' ---------------------------------------------------------------------- -- Output files configuration os.execute('mkdir -p ' .. opt.save) cmd:log(opt.save .. '/log.txt', opt) local netFilename = paths.concat(opt.save, 'Net') local optStateFilename = paths.concat(opt.save,'optState') local vocabSize = data.vocabSize local vocab = data.vocab local decoder = data.decoder local trainRegime = modelConfig.regime local recurrent = modelConfig.recurrent local stateSize = modelConfig.stateSize local embedder = modelConfig.embedder local classifier = modelConfig.classifier -- Model + Loss: local model = nn.Sequential() model:add(embedder) model:add(recurrent) model:add(nn.TemporalModule(classifier)) local criterion = nn.CrossEntropyCriterion()--ClassNLLCriterion() local TensorType = 'torch.FloatTensor' if opt.type =='cuda' then require 'cutorch' require 'cunn' cutorch.setDevice(opt.devid) cutorch.manualSeed(opt.seed) model:cuda() criterion = criterion:cuda() TensorType = 'torch.CudaTensor' ---Support for multiple GPUs - currently data parallel scheme if opt.nGPU > 1 then initState:resize(opt.batchSize / opt.nGPU, stateSize) local net = model model = nn.DataParallelTable(1) model:add(net, 1) for i = 2, opt.nGPU do cutorch.setDevice(i) model:add(net:clone(), i) -- Use the ith GPU end cutorch.setDevice(opt.devid) end end --sequential criterion local seqCriterion = nn.TemporalCriterion(criterion) -- Optimization configuration local Weights,Gradients = model:getParameters() --initialize weights uniformly Weights:uniform(-opt.initWeight, opt.initWeight) local savedModel = { embedder = embedder:clone('weight','bias', 'running_mean', 'running_std'), recurrent = recurrent:clone('weight','bias', 'running_mean', 'running_std'), classifier = classifier:clone('weight','bias', 'running_mean', 'running_std') } ---------------------------------------------------------------------- print '\n==> Network' print(model) print('\n==>' .. Weights:nElement() .. ' Parameters') print '\n==> Criterion' print(criterion) if trainRegime then print '\n==> Training Regime' table.foreach(trainRegime, function(x, val) print(string.format('%012s',x), unpack(val)) end) end ------------------Optimization Configuration-------------------------- local optimState = { learningRate = opt.LR, momentum = opt.momentum, weightDecay = opt.weightDecay, learningRateDecay = opt.LRDecay } local optimizer = Optimizer{ Model = model, Loss = seqCriterion, OptFunction = _G.optim[opt.optimization], OptState = optimState, Parameters = {Weights, Gradients}, Regime = trainRegime, GradRenorm = opt.gradClip } ---------------------------------------------------------------------- ---utility functions local function reshapeData(wordVec, seqLength, batchSize) local offset = offset or 0 local length = wordVec:nElement() local numBatches = torch.floor(length / (batchSize * seqLength)) local batchWordVec = wordVec.new():resize(numBatches, batchSize, seqLength) local endWords = wordVec.new():resize(numBatches, batchSize, 1) local endIdxs = torch.LongTensor() for i=1, batchSize do local startPos = torch.round((i - 1) * length / batchSize ) + 1 local sliceLength = seqLength * numBatches local endPos = startPos + sliceLength - 1 batchWordVec:select(2,i):copy(wordVec:narrow(1, startPos, sliceLength)) endIdxs:range(startPos + seqLength, endPos + 1, seqLength) endWords:select(2,i):copy(wordVec:index(1, endIdxs)) end return batchWordVec, endWords end local function saveModel(epoch) local fn = netFilename .. '_' .. epoch .. '.t7' torch.save(fn, { embedder = savedModel.embedder:clone():float(), recurrent = savedModel.recurrent:clone():float(), classifier = savedModel.classifier:clone():float(), inputSize = inputSize, stateSize = stateSize, vocab = vocab, decoder = decoder }) collectgarbage() end ---------------------------------------------------------------------- local function ForwardSeq(dataVec, train) local data, labels = reshapeData(dataVec, opt.seqLength, opt.batchSize ) local sizeData = data:size(1) local numSamples = 0 local lossVal = 0 local currLoss = 0 local x = torch.Tensor(opt.batchSize, opt.seqLength):type(TensorType) local yt = torch.Tensor(opt.batchSize, opt.seqLength):type(TensorType) -- input is a sequence model:sequence() model:forget() for b=1, sizeData do if b==1 or opt.shuffle then --no dependancy between consecutive batches model:zeroState() end x:copy(data[b]) yt:narrow(2,1,opt.seqLength-1):copy(x:narrow(2,2,opt.seqLength-1)) yt:select(2, opt.seqLength):copy(labels[b]) if train then if opt.nGPU > 1 then model:syncParameters() end y, currLoss = optimizer:optimize(x, yt) else y = model:forward(x) currLoss = seqCriterion:forward(y,yt) end lossVal = currLoss / opt.seqLength + lossVal numSamples = numSamples + x:size(1) xlua.progress(numSamples, sizeData*opt.batchSize) end collectgarbage() xlua.progress(numSamples, sizeData) return lossVal / sizeData end local function ForwardSingle(dataVec) local sizeData = dataVec:nElement() local numSamples = 0 local lossVal = 0 local currLoss = 0 -- input is from a single time step model:single() local x = torch.Tensor(1,1):type(TensorType) local y for i=1, sizeData-1 do x:fill(dataVec[i]) y = recurrent:forward(embedder:forward(x):select(2,1)) currLoss = criterion:forward(y, dataVec[i+1]) lossVal = currLoss + lossVal if (i % 100 == 0) then xlua.progress(i, sizeData) end end collectgarbage() return(lossVal/sizeData) end ------------------------------ local function train(dataVec) model:training() return ForwardSeq(dataVec, true) end local function evaluate(dataVec) model:evaluate() return ForwardSeq(dataVec, false) end local function sample(str, num, space, temperature) local num = num or 50 local temperature = temperature or 1 local function smp(preds) if temperature == 0 then local _, num = preds:max(2) return num else preds:div(temperature) -- scale by temperature local probs = preds:squeeze() probs:div(probs:sum()) -- renormalize so probs sum to one local num = torch.multinomial(probs:float(), 1):typeAs(preds) return num end end recurrent:evaluate() recurrent:single() local sampleModel = nn.Sequential():add(embedder):add(recurrent):add(classifier):add(nn.SoftMax():type(TensorType)) local pred, predText, embedded if str then local encoded = data.encode(str) for i=1, encoded:nElement() do pred = sampleModel:forward(encoded:narrow(1,i,1)) end wordNum = smp(pred) predText = str .. '... ' .. decoder[wordNum:squeeze()] else wordNum = torch.Tensor(1):random(vocabSize):type(TensorType) predText = '' end for i=1, num do pred = sampleModel:forward(wordNum) wordNum = smp(pred) if space then predText = predText .. ' ' .. decoder[wordNum:squeeze()] else predText = predText .. decoder[wordNum:squeeze()] end end return predText end return { train = train, evaluate = evaluate, sample = sample, saveModel = saveModel, optimState = optimState, model = model }
--[[ Copyright (c) 2014 Edvin "Lego3" Linge Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --]] -- When running unittests we cannot restrict global variables as is usually -- done, since the busted library relies on being able to do so. -- We still need to mimic the possibility to call the functions available -- in strict.lua though. local rawset, error, tostring = rawset, error, tostring local strict_mt = {} local allowed_globals = setmetatable({}, {__mode = "k"}) local function newindex(t, k, v) rawset(t, k, v) end local function index(t, k) return nil end local function restrict(ni, i, ...) strict_mt.__newindex = ni strict_mt.__index = i return ... end restrict(newindex, index) --!! Wrap a function so that it is freely able to set global variables --[[ Some existing functions (for example, `require`) should be allowed to read and write global variables without having to worry about declaring them with `strict_declare_global`. !param fn The function which should be able to freely set globals !return A new function which acts just as `fn` and is free to set globals !example require = destrict(require) ]] function destrict(fn) return function(...) local ni, i = strict_mt.__newindex, strict_mt.__index strict_mt.__newindex, strict_mt.__index = nil return restrict(ni, i, fn(...)) end end --!! Declare a global variable so that it can later be used --[[!param name The name of the global to declare !example strict_declare_global "some_var" some_var = 42 ]] function strict_declare_global(name) allowed_globals[name] = true end setmetatable(_G, strict_mt)
local mod = DBM:NewMod("AtalDazarTrash", "DBM-Party-BfA", 1) local L = mod:GetLocalizedStrings() mod:SetRevision("20190416205700") --mod:SetModelID(47785) mod:SetZone() mod.isTrashMod = true mod:RegisterEvents( "SPELL_CAST_START 255824 253562 255041 253544 253517 256849 252781", "SPELL_AURA_APPLIED 260666 255824 256849 252781 252687", "SPELL_CAST_SUCCESS 253583 253721" ) local warnBulwarkofJuju = mod:NewSpellAnnounce(253721, 2) local specWarnVenomfangStrike = mod:NewSpecialWarningDefensive(252687, nil, nil, nil, 1, 2) local specWarnUnstableHexSelf = mod:NewSpecialWarningMoveAway(252781, nil, nil, nil, 1, 2) local yellUnstableHex = mod:NewYell(252781) local specWarnFanaticsRage = mod:NewSpecialWarningInterrupt(255824, "HasInterrupt", nil, nil, 1, 2) local specWarnWildFire = mod:NewSpecialWarningInterrupt(253562, false, nil, 2, 1, 2) local specWarnFieryEnchant = mod:NewSpecialWarningInterrupt(253583, "HasInterrupt", nil, nil, 1, 2) local specWarnTerrifyingScreech = mod:NewSpecialWarningInterrupt(255041, "HasInterrupt", nil, nil, 1, 2) local specWarnBwonsamdisMantle = mod:NewSpecialWarningInterrupt(253544, "HasInterrupt", nil, nil, 1, 2) local specWarnMendingWord = mod:NewSpecialWarningInterrupt(253517, "HasInterrupt", nil, nil, 1, 2) local specWarnDinoMight = mod:NewSpecialWarningInterrupt(256849, "HasInterrupt", nil, nil, 1, 2) local specWarnUnstableHex = mod:NewSpecialWarningInterrupt(252781, "HasInterrupt", nil, nil, 1, 2) local specWarnTransfusion = mod:NewSpecialWarningMoveTo(260666, nil, nil, nil, 3, 2) local specWarnFanaticsRageDispel = mod:NewSpecialWarningDispel(255824, "RemoveEnrage", nil, 2, 1, 2) local specWarnDinoMightDispel = mod:NewSpecialWarningDispel(256849, "MagicDispeller", nil, nil, 1, 2) local specWarnVenomfangStrikeDispel = mod:NewSpecialWarningDispel(252687, "RemovePoison", nil, nil, 1, 2) local taintedBlood = DBM:GetSpellInfo(255558) function mod:SPELL_CAST_START(args) if not self.Options.Enabled then return end local spellId = args.spellId if spellId == 255824 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnFanaticsRage:Show(args.sourceName) specWarnFanaticsRage:Play("kickcast") elseif spellId == 253562 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnWildFire:Show(args.sourceName) specWarnWildFire:Play("kickcast") elseif spellId == 255041 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnTerrifyingScreech:Show(args.sourceName) specWarnTerrifyingScreech:Play("kickcast") elseif spellId == 253544 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnBwonsamdisMantle:Show(args.sourceName) specWarnBwonsamdisMantle:Play("kickcast") elseif spellId == 253517 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnMendingWord:Show(args.sourceName) specWarnMendingWord:Play("kickcast") elseif spellId == 256849 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnDinoMight:Show(args.sourceName) specWarnDinoMight:Play("kickcast") elseif spellId == 252781 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnUnstableHex:Show(args.sourceName) specWarnUnstableHex:Play("kickcast") end end function mod:SPELL_AURA_APPLIED(args) if not self.Options.Enabled then return end local spellId = args.spellId if spellId == 260666 and args:IsPlayer() then specWarnTransfusion:Show(taintedBlood) specWarnTransfusion:Play("takedamage") elseif spellId == 255824 then specWarnFanaticsRageDispel:Show(args.destName) specWarnFanaticsRageDispel:Play("helpdispel") elseif spellId == 256849 then specWarnDinoMightDispel:Show(args.destName) specWarnDinoMightDispel:Play("helpdispel") elseif spellId == 252781 and args:IsPlayer() then specWarnUnstableHexSelf:Show() specWarnUnstableHexSelf:Play("runout") yellUnstableHex:Yell() elseif spellId == 252687 and args:IsDestTypePlayer() then if args:IsPlayer() then specWarnVenomfangStrike:Show() specWarnVenomfangStrike:Play("defensive") elseif self:CheckDispelFilter() then specWarnVenomfangStrikeDispel:Show(args.destName) specWarnVenomfangStrikeDispel:Play("helpdispel") end end end function mod:SPELL_CAST_SUCCESS(args) if not self.Options.Enabled then return end local spellId = args.spellId if spellId == 253583 and self:CheckInterruptFilter(args.sourceGUID, false, true) then specWarnFieryEnchant:Show(args.sourceName) specWarnFieryEnchant:Play("kickcast") elseif spellId == 253721 and self:AntiSpam(3, 1) then warnBulwarkofJuju:Show() end end
local Client = Client local min = math.min local ceil = math.ceil function GUIScale(size) return min(Client.GetScreenWidth(), Client.GetScreenHeight()) / 1080 * size end function GUIGetSprite(x, y, w, h) return (x-1)*w, (y-1)*h, x*w, y*h end
if engine.ActiveGamemode() ~= "terrortown" then return end if SERVER then AddCSLuaFile() resource.AddFile( "models/weapons/zed/v_banshee.mdl" ) --resource.AddFile( "models/weapons/tfa_echo/c_claws_new.mdl" ) SWEP.Weight = 1 SWEP.AutoSwitchTo = false SWEP.AutoSwitchFrom = false end if CLIENT then SWEP.PrintName = "weapon_ttt_slk_claws_name" SWEP.DrawAmmo = false -- not needed? SWEP.DrawCrosshair = true SWEP.ViewModelFlip = false SWEP.ViewModelFOV = 74 SWEP.Slot = 1 SWEP.Slotpos = 1 end SWEP.Base = "weapon_tttbase" SWEP.ViewModel = "models/weapons/zed/v_banshee.mdl" --"models/weapons/tfa_echo/c_claws_new.mdl" -- -- SWEP.WorldModel = ""--"models/weapons/v_banshee.mdl" -- change this! w_pistol SWEP.HoldType = "fist" --knife SWEP.UseHands = false SWEP.Kind = WEAPON_PISTOL -- PRIMARY: Claws Attack SWEP.Primary.Damage = 33 SWEP.Primary.Delay = 0.75 SWEP.Primary.Automatic = true SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Ammo = "none" SWEP.Primary.MissSound = Sound( "weapons/knife/knife_slash2.wav" ) SWEP.Primary.HitSound = Sound( "npc/fast_zombie/claw_strike3.wav" ) -- SECONDARY: Claws Push SWEP.Secondary.Damage = 10 SWEP.Secondary.HitForce = 6000 SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.Secondary.Delay = 3 SWEP.Secondary.Sound = Sound( "weapons/knife/knife_slash2.wav" ) SWEP.Secondary.Hit = Sound( "npc/fast_zombie/claw_strike3.wav" ) -- TTT2 related SWEP.HitDistance = 50 SWEP.AllowDrop = false SWEP.IsSilent = true -- Pull out faster than standard guns SWEP.DeploySpeed = 2 -- TODO: Richtig Implementieren SWEP.RegenTime = true function SWEP:Initialize() self:SetWeaponHoldType( self.HoldType ) if CLIENT then self:AddTTT2HUDHelp("weapon_ttt_slk_claws_help_pri", "weapon_ttt_slk_claws_help_sec") end end function SWEP:Deploy() -- local vm = self.GetOwner():GetViewModel() -- vm:SendViewModelMatchingSequence( vm:LookupSequence( "idle" ) ) local viewmodel = self:GetOwner():GetViewModel( 0 ) if ( IsValid( viewmodel ) ) then --associate its weapon to us viewmodel:SetWeaponModel( self.ViewModel , self ) end self:SendViewModelAnim( ACT_VM_DEPLOY , 0 ) timer.Simple(1, function() self:SendViewModelAnim( ACT_VM_IDLE , 0 ) end) if CLIENT and self:GetOwner():HasEquipmentItem("item_ttt_slk_lifesteal") then RECHARGE_STATUS:AddStatus("ttt2_slk_lifesteal_recharge") end return true end function SWEP:Holster() local viewmodel1 = self:GetOwner():GetViewModel( 0 ) if ( IsValid( viewmodel1 ) ) then --set its weapon to nil, this way the viewmodel won't show up again viewmodel1:SetWeaponModel( self.ViewModel , nil ) end if CLIENT then RECHARGE_STATUS:RemoveStatus("ttt2_slk_lifesteal_recharge") end return true end function SWEP:SendViewModelAnim( act , index , rate ) if ( not game.SinglePlayer() and not IsFirstTimePredicted() ) then return end if not isfunction(self:GetOwner().GetViewModel) then return end local vm = self:GetOwner():GetViewModel( index ) --("vm:", vm) if ( not IsValid( vm ) ) then return end local seq = vm:SelectWeightedSequence( act ) --print("seq:", seq) if ( seq == -1 ) then return end vm:SendViewModelMatchingSequence( seq ) vm:SetPlaybackRate( rate or 1 ) end function SWEP:Equip(owner) if SERVER and owner then self:GetOwner():DrawWorldModel( false ) -- elseif CLIENT then -- self:GetOwner():DrawViewModel( true ) end --self.ViewModel = "models/weapons/v_banshee.mdl" --self.WorldModel = "" -- net.Start("ttt2_slk_network_wep") -- net.WriteEntity(self) -- net.WriteString("") -- net.Broadcast() -- STATUS:RemoveStatus(owner, "ttt2_slk_knife_recharge") end function SWEP:PrimaryAttack() ------------------------------------------------------------ -- credits go to: https://github.com/nuke-haus/thestalker -- ------------------------------------------------------------ -- TODO: Only set this, if the attack hit something. self:SetNextPrimaryFire(CurTime() + self.Primary.Delay) self:SetNextSecondaryFire(CurTime() + self.Primary.Delay) --self.ViewModel = "models/weapons/v_banshee.mdl" local owner = self:GetOwner() if not IsValid(owner) or owner:GetSubRole() ~= ROLE_STALKER or not owner:GetNWBool("ttt2_slk_stalker_mode", false) then return end owner:LagCompensation(true) local tgt, spos, sdest, trace = self:MeleeTrace(self.HitDistance) --print("target:", tgt, "pos:", spos, "destination:", sdest, "trace:", trace) if IsValid(tgt) and (tgt:IsPlayer() or tgt:IsRagdoll()) then --self:SendWeaponAnim(ACT_VM_MISSCENTER) local eData = EffectData() eData:SetStart(spos) eData:SetOrigin(trace.HitPos) eData:SetNormal(trace.Normal) eData:SetEntity(tgt) self:SendViewModelAnim( ACT_VM_PRIMARYATTACK , 0 ) owner:SetAnimation(PLAYER_ATTACK1) tgt:EmitSound( self.Primary.HitSound, 100, math.random(90,110) ) --self:SendWeaponAnim(ACT_VM_MISSCENTER) util.Effect("BloodImpact", eData) else --owner:SetAnimation(PLAYER_ATTACK1) --self:SendWeaponAnim(ACT_VM_MISSCENTER) self:SendViewModelAnim( ACT_VM_MISSCENTER , 0 ) owner:SetAnimation(PLAYER_ATTACK1) -- TODO: keine Ahnung owner:EmitSound( self.Primary.MissSound, 100, math.random(80,100) ) end -- TODO: Warum brauche ich das? --if SERVER then owner:SetAnimation(PLAYER_ATTACK1) end if SERVER and trace.Hit and trace.HitNonWorld and IsValid(tgt) then self:DealDamage(self.Primary.Damage, tgt, trace, spos, sdest, true) end owner:LagCompensation(false) end function SWEP:SecondaryAttack() self:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) self:SetNextSecondaryFire( CurTime() + self.Secondary.Delay ) --self.ViewModel = "models/weapons/v_banshee.mdl" local owner = self:GetOwner() if not IsValid(owner) or owner:GetSubRole() ~= ROLE_STALKER or not owner:GetNWBool("ttt2_slk_stalker_mode", false) then return end owner:LagCompensation(true) local tgt, spos, sdest, trace = self:MeleeTrace(self.HitDistance) --print("target:", tgt, "pos:", spos, "destination:", sdest, "trace:", trace) if IsValid(tgt) then --self:SendWeaponAnim(ACT_VM_MISSCENTER) -- local eData = EffectData() -- eData:SetStart(spos) -- eData:SetOrigin(trace.HitPos) -- eData:SetNormal(trace.Normal) -- eData:SetEntity(tgt) -- self:SendWeaponAnim( ACT_VM_HITCENTER ) self:SendViewModelAnim( ACT_VM_HITCENTER , 0 ) owner:SetAnimation(PLAYER_ATTACK1) tgt:EmitSound( self.Secondary.Hit, 100, math.random(90,110) ) self:PushObject(tgt, trace, self.Secondary.HitForce) -- if tgt:IsPlayer() -- elseif tgt:IsRagdoll() then -- owner:SetAnimation(PLAYER_ATTACK1) -- self:SendWeaponAnim( ACT_VM_HITCENTER ) -- tgt:EmitSound( self.Secondary.Hit, 100, math.random(90,110) ) -- --self:SendWeaponAnim(ACT_VM_MISSCENTER) -- local phys = tgt:GetPhysicsObject() -- if t -- -- tgt:SetPhysicsAttacker( self:GetOwner() ) -- --phys:Wake() -- self:PushObject(phys, trace, self.Secondary.HitForce) -- --util.Effect("BloodImpact", eData) -- end else -- owner:SetAnimation(PLAYER_ATTACK1) -- self:SendWeaponAnim(ACT_VM_MISSCENTER) self:SendViewModelAnim( ACT_VM_MISSCENTER , 0 ) -- TODO: keine Ahnung owner:EmitSound( self.Secondary.Sound, 100, math.random(80,100) ) end -- TODO: Warum brauche ich das? --if SERVER then owner:SetAnimation(PLAYER_ATTACK1) end if SERVER and trace.Hit and trace.HitNonWorld and IsValid(tgt) then self:DealDamage(self.Secondary.Damage, tgt, trace, spos, sdest, false) end owner:LagCompensation(false) end function SWEP:MeleeTrace(hitDistance) ------------------------------------------------------------ -- credits go to: https://github.com/nuke-haus/thestalker -- ------------------------------------------------------------ local owner = self:GetOwner() local spos = owner:GetShootPos() local sdest = spos + (owner:GetAimVector() * hitDistance) local kmins = Vector(1, 1, 1) * -20 local kmaxs = Vector(1, 1, 1) * 20 local trace = util.TraceHull({ start = spos, endpos = sdest, filter = owner, mask = MASK_SHOT_HULL, mins = kmins, maxs = kmaxs }) -- TODO: not shure about this if not IsValid(trace.Entity) then trace = util.TraceLine({ start = spos, endpos = sdest, filter = owner, mask = MASK_SHOT_HULL }) end return trace.Entity, spos, sdest, trace end function SWEP:DealDamage(damage, tgt, trace, spos, sdest, primary) local owner = self:GetOwner() local dmg = DamageInfo() dmg:SetDamage(damage) dmg:SetAttacker(owner) dmg:SetInflictor(self) dmg:SetDamageForce(owner:GetAimVector() * 5) dmg:SetDamagePosition(owner:GetPos()) dmg:SetDamageType(DMG_SLASH) if tgt:IsPlayer() or tgt:IsRagdoll() then hook.Run("ttt_slk_claws_hit", owner, tgt, damage, primary) end tgt:DispatchTraceAttack(dmg, spos + (owner:GetAimVector() * 3), sdest) end function SWEP:Murder(trace, spos, sdest) local tgt = trace.Entity local owner = self:GetOwner() local dmg = DamageInfo() dmg:SetDamage(2000) dmg:SetAttacker(owner) dmg:SetInflictor(self) dmg:SetDamageForce(owner:GetAimVector()) dmg:SetDamagePosition(owner:GetPos()) dmg:SetDamageType(DMG_SLASH) local retrace = util.TraceLine({ start = spos, endpos = sdest, filter = owner, mask = MASK_SHOT_HULL }) if retrace.Entity ~= tgt then local center = tgt:LocalToWorld(tgt:OBBCenter()) retrace = util.TraceLine({ start = spos, endpos = sdest, filter = owner, mask = MASK_SHOT_HULL }) end local bone = retrace.PhysicsBone local pos = retrace.HitPos local norm = trace.Normal local angle = Angle(-28, 0, 0) + norm:Angle() angle:RotateAroundAxis(angle:Right(), -90) pos = pos - (angle:Forward() * 7) tgt.effect_fn = function(rag) local moreTrace = util.TraceLine({ start = pos, endpos = pos + norm * 40, filter = ignore, mask = MASK_SHOT_HULL }) if IsValid(moreTrace.Entity) and moreTrace.Entity == rag then bone = moreTrace.PhysicsBone pos = moreTrace.HitPos angle = Angle(-28, 0, 0) + moreTrace.Normal:Angle() angle:RotateAroundAxis(angle:Right(), -90) pos = pos - (angle:Forward() * 10) end -- local knife = ents.Create("prop_physics") -- knife:SetModel("models/weapons/w_knife_t.mdl") -- knife:SetPos(pos) -- knife:SetCollisionGroup(COLLISION_GROUP_DEBRIS) -- knife:SetAngles(angle) -- knife.CanPickup = false -- knife:Spawn() -- local phys = knife:GetPhysicsObject() -- if IsValid(phys) then -- phys:EnableCollisions(false) -- end -- constraint.Weld(rag, knife, bone, 0, 0, true) -- rag:CallOnRemove("ttt_knife_cleanup", function() -- SafeRemoveEntity(knife) -- end) end tgt:DispatchTraceAttack(dmg, spos + owner:GetAimVector() * 3, sdest) end function SWEP:PushObject(tgt, trace, force) -- phys, pdir, maxforce, is_ragdol local dir = self:GetOwner():GetEyeTrace(MASK_SHOT).Normal --print("Push Target:", tgt, "direction: ", dir) local phys = tgt:GetPhysicsObject() if IsValid(phys) and not tgt:IsPlayer() then local mass = math.log(math.Clamp(phys:GetMass(), 10, 1000)) --print("Phys Object has mass:", mass) local pushvel = dir * force / mass pushvel.z = math.Clamp(pushvel.z, 50, 300) --print("Object Push Velocity:", pushvel) phys:AddVelocity(pushvel) elseif tgt:IsPlayer() then local mass = 5 local pushvel = dir * force / mass pushvel.z = math.Clamp(pushvel.z, 50, 300) --print("Player Push Velocity:", pushvel) tgt:SetVelocity(tgt:GetVelocity() + pushvel) end if tgt:IsPlayer() then tgt.was_pushed = { att = self:GetOwner(), t = CurTime(), wep = self:GetClass(), -- infl = self } end end if CLIENT then function SWEP:DrawHUD() self:DrawHelp() end -- function SWEP:ShouldDrawViewModel() -- return true -- end end
-- libs require 'parallel' require 'torch' require 'image' -- forked process function worker() require 'torch' while true do parallel.yield() t = parallel.parent:receive() io.write('.') io.flush() collectgarbage() end end -- parent function parent() process = parallel.fork() process:exec(worker) N = 100 t = image.scale(image.lena():float(), 640,480) timer = torch.Timer() for i = 1,N do process:join() process:send(t) end print('') print('average time to transfer one image: ' .. timer:time().real/N .. ' sec') end -- protected env ok,err = pcall(parent) if not ok then print(err) end parallel.close()
require("settings.init") require("plugins.init") require("configs.init")
--Script.ReloadScript("Scripts/AI/anchor.lua"); System.Log("Loading AIAlertness.lua"); AIAlertness = { type = "AIAlertness", Properties = { bEnabled = 1, }, Editor={ Model="Editor/Objects/box.cgf", }, } ------------------------------------------------------- function AIAlertness:OnPropertyChange() self:Register(); end ------------------------------------------------------- function AIAlertness:OnInit() self:Register(); end ------------------------------------------------------- function AIAlertness:OnReset() self.bNowEnabled = self.Properties.bEnabled; if (self.Properties.bEnabled == 0) then self:TriggerEvent(AIEVENT_DISABLE); else self:TriggerEvent(AIEVENT_ENABLE); end end ------------------------------------------------------- function AIAlertness:Register() CryAction.RegisterWithAI( self.id, AIOBJECT_GLOBALALERTNESS ); self:OnReset(); end ------------------------------------------------------- function AIAlertness:Event_Enable() self:TriggerEvent(AIEVENT_ENABLE); self.bNowEnabled = 1; BroadcastEvent(self, "Enable"); end ------------------------------------------------------- function AIAlertness:Event_Disable() self:TriggerEvent(AIEVENT_DISABLE); self.bNowEnabled = 0; BroadcastEvent(self, "Disable"); end ------------------------------------------------------- function AIAlertness:SetAlertness( level ) if ( self.bNowEnabled ) then if ( level == 0 ) then self:Event_Green(); elseif ( level == 1 ) then self:Event_Orange(); elseif ( level == 2 ) then self:Event_Red(); end end end ------------------------------------------------------- function AIAlertness:Event_Green( sender ) AI.LogEvent("GLOBAL ALERTNESS STATE: GREEN"); BroadcastEvent(self, "Green"); end ------------------------------------------------------- function AIAlertness:Event_Orange( sender ) AI.LogEvent("GLOBAL ALERTNESS STATE: ORANGE"); BroadcastEvent(self, "Orange"); end ------------------------------------------------------- function AIAlertness:Event_Red( sender ) AI.LogEvent("GLOBAL ALERTNESS STATE: RED"); BroadcastEvent(self, "Red"); end AIAlertness.FlowEvents = { Inputs = { Disable = { AIAlertness.Event_Disable, "bool" }, Enable = { AIAlertness.Event_Enable, "bool" }, Green = { AIAlertness.Event_Green, "bool" }, Orange = { AIAlertness.Event_Orange, "bool" }, Red = { AIAlertness.Event_Red, "bool" }, }, Outputs = { Disable = "bool", Enable = "bool", Green = "bool", Orange = "bool", Red = "bool", }, }
-- Generated By protoc-gen-lua Do not Edit local protobuf = require "protobuf" module('BseGuildBagEvent_pb', package.seeall) local GUILDBAGEVENT = protobuf.Descriptor(); local GUILDBAGEVENT_TIME_FIELD = protobuf.FieldDescriptor(); local GUILDBAGEVENT_ROLENAME_FIELD = protobuf.FieldDescriptor(); local GUILDBAGEVENT_ACTION_FIELD = protobuf.FieldDescriptor(); local GUILDBAGEVENT_ITEM_FIELD = protobuf.FieldDescriptor(); local BSEGUILDBAGEVENT = protobuf.Descriptor(); local BSEGUILDBAGEVENT_GUILDID_FIELD = protobuf.FieldDescriptor(); local BSEGUILDBAGEVENT_EVENT_FIELD = protobuf.FieldDescriptor(); GUILDBAGEVENT_TIME_FIELD.name = "time" GUILDBAGEVENT_TIME_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.GuildBagEvent.time" GUILDBAGEVENT_TIME_FIELD.number = 1 GUILDBAGEVENT_TIME_FIELD.index = 0 GUILDBAGEVENT_TIME_FIELD.label = 1 GUILDBAGEVENT_TIME_FIELD.has_default_value = false GUILDBAGEVENT_TIME_FIELD.default_value = "" GUILDBAGEVENT_TIME_FIELD.type = 9 GUILDBAGEVENT_TIME_FIELD.cpp_type = 9 GUILDBAGEVENT_ROLENAME_FIELD.name = "rolename" GUILDBAGEVENT_ROLENAME_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.GuildBagEvent.rolename" GUILDBAGEVENT_ROLENAME_FIELD.number = 3 GUILDBAGEVENT_ROLENAME_FIELD.index = 1 GUILDBAGEVENT_ROLENAME_FIELD.label = 1 GUILDBAGEVENT_ROLENAME_FIELD.has_default_value = false GUILDBAGEVENT_ROLENAME_FIELD.default_value = "" GUILDBAGEVENT_ROLENAME_FIELD.type = 9 GUILDBAGEVENT_ROLENAME_FIELD.cpp_type = 9 GUILDBAGEVENT_ACTION_FIELD.name = "action" GUILDBAGEVENT_ACTION_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.GuildBagEvent.action" GUILDBAGEVENT_ACTION_FIELD.number = 4 GUILDBAGEVENT_ACTION_FIELD.index = 2 GUILDBAGEVENT_ACTION_FIELD.label = 1 GUILDBAGEVENT_ACTION_FIELD.has_default_value = false GUILDBAGEVENT_ACTION_FIELD.default_value = "" GUILDBAGEVENT_ACTION_FIELD.type = 9 GUILDBAGEVENT_ACTION_FIELD.cpp_type = 9 GUILDBAGEVENT_ITEM_FIELD.name = "item" GUILDBAGEVENT_ITEM_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.GuildBagEvent.item" GUILDBAGEVENT_ITEM_FIELD.number = 5 GUILDBAGEVENT_ITEM_FIELD.index = 3 GUILDBAGEVENT_ITEM_FIELD.label = 1 GUILDBAGEVENT_ITEM_FIELD.has_default_value = false GUILDBAGEVENT_ITEM_FIELD.default_value = "" GUILDBAGEVENT_ITEM_FIELD.type = 9 GUILDBAGEVENT_ITEM_FIELD.cpp_type = 9 GUILDBAGEVENT.name = "GuildBagEvent" GUILDBAGEVENT.full_name = ".com.xinqihd.sns.gameserver.proto.GuildBagEvent" GUILDBAGEVENT.nested_types = {} GUILDBAGEVENT.enum_types = {} GUILDBAGEVENT.fields = {GUILDBAGEVENT_TIME_FIELD, GUILDBAGEVENT_ROLENAME_FIELD, GUILDBAGEVENT_ACTION_FIELD, GUILDBAGEVENT_ITEM_FIELD} GUILDBAGEVENT.is_extendable = false GUILDBAGEVENT.extensions = {} BSEGUILDBAGEVENT_GUILDID_FIELD.name = "guildID" BSEGUILDBAGEVENT_GUILDID_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.BseGuildBagEvent.guildID" BSEGUILDBAGEVENT_GUILDID_FIELD.number = 1 BSEGUILDBAGEVENT_GUILDID_FIELD.index = 0 BSEGUILDBAGEVENT_GUILDID_FIELD.label = 1 BSEGUILDBAGEVENT_GUILDID_FIELD.has_default_value = false BSEGUILDBAGEVENT_GUILDID_FIELD.default_value = "" BSEGUILDBAGEVENT_GUILDID_FIELD.type = 9 BSEGUILDBAGEVENT_GUILDID_FIELD.cpp_type = 9 BSEGUILDBAGEVENT_EVENT_FIELD.name = "event" BSEGUILDBAGEVENT_EVENT_FIELD.full_name = ".com.xinqihd.sns.gameserver.proto.BseGuildBagEvent.event" BSEGUILDBAGEVENT_EVENT_FIELD.number = 2 BSEGUILDBAGEVENT_EVENT_FIELD.index = 1 BSEGUILDBAGEVENT_EVENT_FIELD.label = 3 BSEGUILDBAGEVENT_EVENT_FIELD.has_default_value = false BSEGUILDBAGEVENT_EVENT_FIELD.default_value = {} BSEGUILDBAGEVENT_EVENT_FIELD.message_type = GUILDBAGEVENT BSEGUILDBAGEVENT_EVENT_FIELD.type = 11 BSEGUILDBAGEVENT_EVENT_FIELD.cpp_type = 10 BSEGUILDBAGEVENT.name = "BseGuildBagEvent" BSEGUILDBAGEVENT.full_name = ".com.xinqihd.sns.gameserver.proto.BseGuildBagEvent" BSEGUILDBAGEVENT.nested_types = {} BSEGUILDBAGEVENT.enum_types = {} BSEGUILDBAGEVENT.fields = {BSEGUILDBAGEVENT_GUILDID_FIELD, BSEGUILDBAGEVENT_EVENT_FIELD} BSEGUILDBAGEVENT.is_extendable = false BSEGUILDBAGEVENT.extensions = {} BseGuildBagEvent = protobuf.Message(BSEGUILDBAGEVENT) GuildBagEvent = protobuf.Message(GUILDBAGEVENT) _G.BSEGUILDBAGEVENT_PB_BSEGUILDBAGEVENT = BSEGUILDBAGEVENT _G.GUILDBAGEVENT_PB_GUILDBAGEVENT = GUILDBAGEVENT
local function build_args(args) local function to_string(arg) if arg == nil then return {} end if type(arg) == 'string' then return { arg } end if type(arg) == 'table' then return arg end error(string.format('unimplemented for %s of type %s', arg, type(arg))) end return vim.tbl_filter( function(a) return #a > 0 end, vim.tbl_flatten { to_string(args), } ) end local function pop(opts, command, args) local buf = vim.api.nvim_create_buf(false, true) local win = vim.api.nvim_open_win(buf, true, { relative = 'win', width = 80, height = 24, row = 1, col = 3, border = 'rounded', style = 'minimal', }) vim.cmd(string.format([[autocmd TermOpen <buffer=%s> startinsert]], buf)) vim.fn.termopen(build_args { command, args }, { cwd = opts.cwd, on_stderr = function(...) print(vim.inspect { 'stderr', ... }) end, on_exit = function() if opts.update then require('fixity.display').update_displays() end end, }) end local function construct(opts, command, args) return require('plenary.job'):new { command = command, args = args, cwd = opts.cwd, on_stderr = function(...) print(vim.inspect { 'stderr', ... }) end, on_exit = function(j, return_val) if return_val ~= 0 then print(vim.inspect { command, args }, 'returned', return_val) print(vim.inspect(j:stderr_result())) return end local result = j:result() if opts.callback then opts.callback(result) end if opts.schedule then vim.schedule(function() opts.schedule(result) end) end end, } end local function send_it(opts, command, ...) if not opts.cwd then opts.cwd = require('fixity.repo').root end local args = ... if not opts.direct then args = { command, ... } command = 'git' end if not opts.silent then return pop(opts, command, args) end local job = construct(opts, command, build_args(args)) job:start() if opts.stdin then job:send(opts.stdin) job.stdin:close() end job:wait() if opts.update then require('fixity.display').update_displays() end end -- Some black magic local function bool(name) return function(t) t.__options[name] = true return t end end local function setter(name) return function(t) return function(value) t.__options[name] = value return t end end end local __options = { direct = bool 'direct', silent = bool 'silent', update = bool 'update', callback = setter 'callback', cwd = setter 'cwd', schedule = setter 'schedule', stdin = setter 'stdin', } local OptionsMaker = { __index = function(t, k) if __options[k] ~= nil then return __options[k](t) end return function(...) send_it(t.__options, k, ...) end end, } local commands = {} setmetatable(commands, { __index = function(_, k) local t = { __options = {} } setmetatable(t, OptionsMaker) return t[k] end, __call = function(t, k, ...) return t[k](...) end, }) vim.cmd "command! -nargs=+ F lua require'fixity.commands'(<f-args>)" return commands
-- // RE-DEFINITIONS // local clock = os.clock -- // CLASS // local TimedFunction = {} local TimedFunctionClass = {} TimedFunctionClass.__index = TimedFunctionClass -- // CONSTRUCTOR // function TimedFunction.new(t, func, scheduler) local timedOn = clock() local timed = setmetatable( { expectedResumeTime = timedOn + t, requestedWaitTime = t, func = func, scheduledTime = timedOn, stopped = false, scheduler = scheduler }, TimedFunctionClass ) return timed end -- // METHODS // function TimedFunctionClass:PastOrEqualResumeTime(t) return self.expectedResumeTime <= t end function TimedFunctionClass:Resume(currentTime) if self.stopped then print(self.scheduler) error(tostring(self) .. "\nAttempt to resume a stopped TimedFunction", 2) end local extra = currentTime - self.expectedResumeTime local nextExpectedResumeTime = currentTime + self.requestedWaitTime - extra local success, err = coroutine.resume(coroutine.create(self.func), currentTime - self.scheduledTime) if not success then warn(tostring(self) .. "\nfailed to resume") warn(err) end if not self.stopped then self.expectedResumeTime = nextExpectedResumeTime self.scheduledTime = currentTime end end function TimedFunctionClass:Stop() if not self.stopped then self.stopped = true self.scheduler:StopTimedFunction(self) else warn(tostring(self) .. '\nis not timed!\n' .. (debug.traceback(nil, 2) or '')) end end function TimedFunctionClass:IsStopped() return self.stopped end TimedFunctionClass.Destroy = TimedFunctionClass.Stop -- // META-METHODS // function TimedFunctionClass:__tostring() return ("TimedFunction[%s] {ExpectedResumeTime: %.04f, RequestedWaitTime: %.04f," .. " ScheduledTime: %.04f, Stopped: %s}" ):format(self.scheduler.name, self.expectedResumeTime, self.requestedWaitTime, self.scheduledTime, tostring(self.stopped)) end return {TimedFunction = TimedFunction}
pg = pg or {} pg.enemy_data_statistics_214 = { [12400402] = { cannon = 24, reload = 150, speed_growth = 0, cannon_growth = 880, pilot_ai_template_id = 20005, air = 0, rarity = 1, dodge = 0, torpedo = 0, durability_growth = 20800, antiaircraft = 160, reload_growth = 0, dodge_growth = 0, hit_growth = 144, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, battle_unit_type = 30, base = 142, durability = 890, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, luck = 0, id = 12400402, antiaircraft_growth = 2250, antisub = 0, armor = 0, appear_fx = { "appearsmall" }, equipment_list = { 1100428, 1100234 } }, [12400403] = { cannon = 28, reload = 150, speed_growth = 0, cannon_growth = 1800, rarity = 2, air = 0, torpedo = 0, dodge = 0, durability_growth = 36800, antiaircraft = 125, luck = 0, reload_growth = 0, dodge_growth = 0, hit_growth = 144, star = 3, hit = 10, antisub_growth = 0, air_growth = 0, battle_unit_type = 35, base = 141, durability = 1700, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, id = 12400403, antiaircraft_growth = 1400, antisub = 0, equipment_list = { 1100044, 1100574, 1100458 } }, [12400404] = { cannon = 28, reload = 150, speed_growth = 0, cannon_growth = 1800, rarity = 2, air = 0, torpedo = 0, dodge = 0, durability_growth = 36800, antiaircraft = 125, luck = 0, reload_growth = 0, dodge_growth = 0, hit_growth = 144, star = 3, hit = 10, antisub_growth = 0, air_growth = 0, battle_unit_type = 35, base = 141, durability = 1700, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, id = 12400404, antiaircraft_growth = 1400, antisub = 0, equipment_list = { 1100044, 1100574, 1100458 } }, [12400405] = { cannon = 0, reload = 150, speed_growth = 0, cannon_growth = 0, pilot_ai_template_id = 20004, air = 55, rarity = 1, dodge = 0, torpedo = 0, durability_growth = 65600, antiaircraft = 150, reload_growth = 0, dodge_growth = 0, hit_growth = 144, star = 2, hit = 10, antisub_growth = 0, air_growth = 2000, battle_unit_type = 65, base = 317, durability = 4680, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, luck = 0, id = 12400405, antiaircraft_growth = 1800, antisub = 0, armor = 0, appear_fx = { "appearsmall" }, equipment_list = { 1100780, 1100785, 1100076 } }, [12400406] = { cannon = 45, reload = 150, speed_growth = 0, cannon_growth = 640, pilot_ai_template_id = 10001, air = 0, rarity = 4, dodge = 28, torpedo = 135, durability_growth = 23600, antiaircraft = 125, reload_growth = 0, dodge_growth = 450, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 50, base = 375, durability = 4340, armor_growth = 0, torpedo_growth = 5200, luck_growth = 0, speed = 36, luck = 0, id = 12400406, antiaircraft_growth = 3000, antisub = 0, armor = 0, appear_fx = { "appearQ" }, equipment_list = { 1100024, 1100114, 1100508 } }, [12400407] = { cannon = 102, reload = 150, speed_growth = 0, cannon_growth = 1750, rarity = 4, air = 0, torpedo = 84, dodge = 17, durability_growth = 43200, antiaircraft = 192, luck = 0, reload_growth = 0, dodge_growth = 170, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 60, base = 378, durability = 6040, armor_growth = 0, torpedo_growth = 3200, luck_growth = 0, speed = 18, armor = 0, id = 12400407, antiaircraft_growth = 3880, antisub = 0, appear_fx = { "appearQ" }, equipment_list = { 1100018, 1100624, 1100528, 1100498 } }, [12400408] = { cannon = 120, hit_growth = 350, rarity = 3, speed_growth = 0, pilot_ai_template_id = 10001, air = 0, luck = 0, dodge = 17, cannon_growth = 3600, speed = 14, reload = 150, reload_growth = 0, dodge_growth = 170, id = 12400408, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, torpedo = 0, base = 379, durability = 9010, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, battle_unit_type = 65, armor = 0, durability_growth = 68000, antiaircraft = 212, antisub = 0, antiaircraft_growth = 4680, appear_fx = { "appearQ" }, equipment_list = { 1100024, 1100628, 1100044, 1100734 }, buff_list = { { ID = 50510, LV = 4 } } }, [12400409] = { cannon = 8, prefab = "srDD2", reload = 150, cannon_growth = 560, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 36, durability_growth = 13200, antiaircraft = 80, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 123, durability = 640, armor_growth = 0, torpedo_growth = 3250, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 25, antisub = 0, id = 12400409, antiaircraft_growth = 1000, equipment_list = { 1000593, 1000598, 1000603 } }, [12400410] = { cannon = 24, prefab = "srCL2", reload = 150, cannon_growth = 880, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 0, durability_growth = 20800, antiaircraft = 160, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 124, durability = 890, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 30, antisub = 0, id = 12400410, antiaircraft_growth = 2250, equipment_list = { 1000608, 1000613 } }, [12400411] = { cannon = 28, prefab = "srCA2", reload = 150, cannon_growth = 1800, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 0, durability_growth = 36800, antiaircraft = 125, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 125, durability = 1700, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 35, antisub = 0, id = 12400411, antiaircraft_growth = 1400, equipment_list = { 1000617, 1000623, 1000628 } }, [12400412] = { cannon = 47, prefab = "srBB2", reload = 150, cannon_growth = 2200, speed_growth = 0, air = 0, rarity = 2, dodge = 0, torpedo = 0, durability_growth = 70400, antiaircraft = 135, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 0, hit_growth = 144, base = 126, durability = 5270, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 60, antisub = 0, id = 12400412, antiaircraft_growth = 1400, equipment_list = { 1000633, 1000637, 1000643 } }, [12400413] = { cannon = 0, prefab = "srCV2", reload = 150, cannon_growth = 0, speed_growth = 0, air = 55, rarity = 2, dodge = 0, torpedo = 0, durability_growth = 65600, antiaircraft = 150, reload_growth = 0, dodge_growth = 0, luck = 0, star = 2, hit = 10, antisub_growth = 0, air_growth = 2000, hit_growth = 144, base = 127, durability = 4680, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 15, armor = 0, battle_unit_type = 65, antisub = 0, id = 12400413, antiaircraft_growth = 1800, bound_bone = { cannon = { { 1.8, 1.14, 0 } }, torpedo = { { 1.07, 0.24, 0 } }, antiaircraft = { { 1.8, 1.14, 0 } }, plane = { { 1.8, 1.14, 0 } } }, equipment_list = { 1000647, 1000653, 1000658, 1000663 } }, [12400414] = { cannon = 45, reload = 150, speed_growth = 0, cannon_growth = 640, rarity = 4, air = 0, torpedo = 135, dodge = 28, durability_growth = 23600, antiaircraft = 125, luck = 0, reload_growth = 0, dodge_growth = 450, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 50, base = 248, durability = 4340, armor_growth = 0, torpedo_growth = 5200, luck_growth = 0, speed = 36, armor = 0, id = 12400414, antiaircraft_growth = 3000, antisub = 0, equipment_list = { 1000713, 1000717, 1000722 } }, [12400415] = { cannon = 74, reload = 150, speed_growth = 0, cannon_growth = 936, rarity = 4, air = 0, torpedo = 112, dodge = 11, durability_growth = 33600, antiaircraft = 255, luck = 0, reload_growth = 0, dodge_growth = 162, hit_growth = 210, star = 4, hit = 14, antisub_growth = 0, air_growth = 0, battle_unit_type = 55, base = 249, durability = 5270, armor_growth = 0, torpedo_growth = 3366, luck_growth = 0, speed = 24, armor = 0, id = 12400415, antiaircraft_growth = 3744, antisub = 0, equipment_list = { 1000683, 1000687, 1000693, 1000697 } }, [12400416] = { cannon = 102, reload = 150, speed_growth = 0, cannon_growth = 1750, rarity = 4, air = 0, torpedo = 84, dodge = 17, durability_growth = 43200, antiaircraft = 192, luck = 0, reload_growth = 0, dodge_growth = 170, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 60, base = 250, durability = 6040, armor_growth = 0, torpedo_growth = 3200, luck_growth = 0, speed = 18, armor = 0, id = 12400416, antiaircraft_growth = 3880, antisub = 0, equipment_list = { 1000743, 1000747, 1000753, 1000757 } }, [12400417] = { cannon = 120, reload = 150, speed_growth = 0, cannon_growth = 3600, rarity = 3, air = 0, torpedo = 0, dodge = 17, durability_growth = 68000, antiaircraft = 212, luck = 0, reload_growth = 0, dodge_growth = 170, hit_growth = 350, star = 4, hit = 30, antisub_growth = 0, air_growth = 0, battle_unit_type = 65, base = 251, durability = 9010, armor_growth = 0, torpedo_growth = 0, luck_growth = 0, speed = 14, armor = 0, id = 12400417, antiaircraft_growth = 4680, antisub = 0, equipment_list = { 1000778, 1000782, 1000788 }, buff_list = { { ID = 50510, LV = 4 } } } } return
-- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- local pairs = pairs local ipairs = ipairs local sformat = string.format local tab_concat = table.concat local tab_insert = table.insert local string = string local assert = assert local select = select local pcall = pcall local type = type local getmetatable = getmetatable local setmetatable = setmetatable local json_decode local json_encode do local ok, cjson = pcall(require, 'cjson.safe') if ok then json_decode = require("cjson.safe").decode json_encode = cjson.encode else local json = require "json" json_decode = json.decode json_encode = json.encode end end local nkeys do local ok, table_nkeys = pcall(require, 'table.nkeys') if ok then nkeys = table_nkeys else nkeys = function(t) local count = 0 for _, _ in pairs(t) do count = count + 1 end return count end end end -- -- Code generation -- local generate_common_phase, generate_rule -- forward declaration local codectx_mt = {} codectx_mt.__index = codectx_mt function codectx_mt:libfunc(globalname) local root = self._root local localname = root._globals[globalname] if not localname then localname = globalname:gsub('%.', '_') root._globals[globalname] = localname root:preface(sformat('local %s = %s', localname, globalname)) end return localname end local function q(s) return sformat('%q', s) end function codectx_mt:param(param) tab_insert(self._params, param) return param end function codectx_mt:label() local nlabel = self._nlabels + 1 self._nlabels = nlabel return 'label_' .. nlabel end -- Returns an expression that will result in passed value. -- Currently user vlaues are stored in an array to avoid consuming a lot of local -- and upvalue slots. Array accesses are still decently fast. function codectx_mt:uservalue(val) local slot = #self._root._uservalues + 1 self._root._uservalues[slot] = val return sformat('uservalues[%d]', slot) end function codectx_mt:generate(rule, conf) local root = self._root --rule local rule_ctx, err = generate_rule(root:child(), rule, conf) if err ~= nil then return nil, err end root:stmt(sformat('%s = ', "_M.access"), rule_ctx, "\n\n") -- other phase root:stmt(sformat('%s = ', "_M.header_filter"), generate_common_phase(root:child(), "header_filter"), "\n\n") root:stmt(sformat('%s = ', "_M.body_filter"), generate_common_phase(root:child(), "body_filter"), "\n\n") local release_plugins = 'tablepool.release("script_plugins", ctx.script_plugins)' root:stmt(sformat('%s = ', "_M.log"), generate_common_phase(root:child(), "log", release_plugins), "\n\n") return "_M" end function codectx_mt:preface(...) assert(self._preface, 'preface is only available for root contexts') for i=1, select('#', ...) do tab_insert(self._preface, (select(i, ...))) end tab_insert(self._preface, '\n') end function codectx_mt:stmt(...) for i=1, select('#', ...) do tab_insert(self._body, (select(i, ...))) end tab_insert(self._body, '\n') end -- load doesn't like at all empty string, but sometimes it is easier to add -- some in the chunk buffer local function insert_code(chunk, code_table) if chunk and chunk ~= '' then tab_insert(code_table, chunk) end end function codectx_mt:_generate(code_table) local indent = '' if self._root == self then for _, stmt in ipairs(self._preface) do insert_code(indent, code_table) if getmetatable(stmt) == codectx_mt then stmt:_generate(code_table) else insert_code(stmt, code_table) end end else insert_code('function(', code_table) for _,param in ipairs(self._params) do insert_code(param, code_table) end insert_code(')\n', code_table) indent = string.rep('', self._idx) end for _, stmt in ipairs(self._body) do insert_code(indent, code_table) if getmetatable(stmt) == codectx_mt then stmt:_generate(code_table) else insert_code(stmt, code_table) end end if self._root ~= self then insert_code('end', code_table) end end function codectx_mt:_get_loader() self._code_table = {} self:_generate(self._code_table) return self._code_table end function codectx_mt:as_lua() self:_get_loader() return tab_concat(self._code_table) end -- returns a child code context with the current context as parent function codectx_mt:child(ref) return setmetatable({ _schema = ref, _idx = self._idx + 1, _nloc = 0, _nlabels = 0, _body = {}, _root = self._root, _params = {}, }, codectx_mt) end -- returns a root code context. A root code context holds the library function -- cache (as upvalues for the child contexts), a preface, and no named params local function codectx(rule, conf, options) local self = setmetatable({ _rule = rule, _conf = conf, _code_table = {}, _idx = 0, -- code generation _nloc = 0, _nlabels = 0, _preface = {}, _body = {}, _globals = {}, _uservalues = {} }, codectx_mt) self._root = self return self end generate_common_phase = function(ctx, phase, tail_lua) ctx:stmt('local plugins = ctx.script_plugins') ctx:stmt('for i = 1, #plugins, 2 do') ctx:stmt(' local plugin_name = plugins[i]') ctx:stmt(' local plugin_conf_name = plugins[i + 1]') ctx:stmt(' local plugin_obj = plugin.get(plugin_name)') ctx:stmt(' local phase_fun = plugin_obj.' .. phase) ctx:stmt(' if phase_fun then') ctx:stmt(sformat(' phase_fun(_M[plugin_conf_name], %s)', ctx:param("ctx"))) ctx:stmt(' end') ctx:stmt('end') if tail_lua then ctx:stmt( tail_lua) end return ctx end local function conf_lua_name(rule_id) if not rule_id then return "" end local conf_lua = "conf_" .. string.gsub(rule_id, '-', '_') return conf_lua end local function func_lua_name(rule_id) if not rule_id then return "" end local func_lua = "func_rule_" .. string.gsub(rule_id, '-', '_') return func_lua end local function plugin_lua_name(plugin_name) if not plugin_name then return "" end local plugin_lua = string.gsub(plugin_name, '-', '_') return plugin_lua end local function _gen_rule_lua(ctx, rule_id, conf, conditions, target_ids) local root = ctx._root local plugin_conf = conf[rule_id] local plugin_name = plugin_conf.name local plugin_name_lua = plugin_lua_name(plugin_name) if not plugin_conf then return nil, "invalid conf!" end -- conf local conf_lua = conf_lua_name(rule_id) local func_lua = func_lua_name(rule_id) root:preface("_M." .. conf_lua .. " = core.json.decode(\n [[" .. json_encode(plugin_conf.conf) .. "]]\n)") -- plugin root:preface(sformat('local %s = plugin.get("%s")', plugin_name_lua, plugin_name)) -- function root:preface(sformat('local function %s(ctx)', func_lua)) root:preface(sformat(' local phase_fun = %s.access or %s.rewrite', plugin_name_lua, plugin_name_lua)) root:preface( ' local plugins = ctx.script_plugins\n') root:preface(sformat(' local code, body = phase_fun(%s, ctx)', '_M.' .. conf_lua)) root:preface(sformat(' core.table.insert(plugins, %s)', q(plugin_name))) root:preface(sformat(' core.table.insert(plugins, %s)', q(conf_lua))) local condition_children = 0 local no_condition_children = 0 for key, condition_arr in pairs(conditions) do local target_id = condition_arr[2] if target_id and target_id ~= "" then local func_target = func_lua_name(target_id) target_ids[target_id] = 1 local target_plugin_conf = conf[target_id] if not target_plugin_conf then return nil, "invalid conf!" end -- condition if condition_arr[1] and condition_arr[1] ~= "" then root:preface(sformat(' if %s then', condition_arr[1])) root:preface(sformat(' return _M.%s(ctx)', func_target)) root:preface( ' end\n') condition_children = condition_children + 1 else no_condition_children = no_condition_children + 1 root:preface(sformat(' return _M.%s(ctx)', func_target)) end end end -- don't have a no condtion child if no_condition_children == 0 and condition_children > 0 then root:preface( ' if code or body then') root:preface( ' core.response.exit(code, body)') root:preface( ' end') end if no_condition_children > 1 then return nil, "can't have more then one no-condition children!" end root:preface( 'end') root:preface(sformat('_M.%s = %s\n\n', func_lua, func_lua)) return func_lua end local function _gen_last_rule_lua(ctx, rule_id, plugin_conf) local root = ctx._root if not plugin_conf then return nil, "invalid conf!" end local plugin_name = plugin_conf.name local plugin_name_lua = plugin_lua_name(plugin_name) -- conf local conf_lua = conf_lua_name(rule_id) local func_lua = func_lua_name(rule_id) root:preface("_M." .. conf_lua .. " = core.json.decode(\n [[" .. json_encode(plugin_conf.conf) .. "]]\n)") -- plugin root:preface(sformat('local %s = plugin.get("%s")', plugin_name_lua, plugin_name)) -- function root:preface(sformat('local function %s(ctx)', func_lua)) root:preface( ' local plugins = ctx.script_plugins\n') root:preface(sformat(' local phase_fun = %s.access or %s.rewrite', plugin_name_lua, plugin_name_lua)) root:preface( ' if phase_fun then') root:preface(sformat(' local code, body = phase_fun(%s, ctx)', '_M.' .. conf_lua)) root:preface( ' if code or body then') root:preface( ' core.response.exit(code, body)') root:preface( ' end') root:preface( ' end') root:preface(sformat(' core.table.insert(plugins, %s)', q(plugin_name))) root:preface(sformat(' core.table.insert(plugins, %s)', q(conf_lua))) root:preface( ' return') root:preface( 'end') root:preface(sformat('_M.%s = %s\n\n', func_lua, func_lua)) return func_lua end generate_rule = function (ctx, rules, conf) if type(rules) ~= "table" then return nil, "invalid rules!" end local root = ctx._root root:preface([[local _M = {}]]) root:preface("\n") local rule_ids, target_ids = {}, {} if not rules.root then return nil, "invalid rules!" end if nkeys(rules) == 1 then local _, err = _gen_rule_lua(ctx, rules.root, conf, {}, target_ids) if err ~= nil then return nil, err end else for rule_id, conditions in pairs(rules) do if rule_id ~= "root" then rule_ids[rule_id] = 1 local _, err = _gen_rule_lua(ctx, rule_id, conf, conditions, target_ids) if err ~= nil then return nil, err end end end end for target_id,_ in pairs(target_ids) do -- last node if not rule_ids[target_id] then local _, err = _gen_last_rule_lua(ctx, target_id, conf[target_id]) if err ~= nil then return nil, err end end end local root_func = func_lua_name(rules.root) ctx:stmt(' ctx.script_plugins = {}') ctx:stmt(sformat(" return %s(%s)", root_func, ctx:param("ctx"))) return ctx end local function generate_ctx(conf, options) -- local data, err = json_decode(conf) local ok, data = pcall(json_decode, conf) if not ok then return nil, data end data.rule = data.rule or {} data.conf = data.conf or {} local ctx = codectx(data.rule, data.conf, options or {}) ctx:preface('local core = require("apisix.core")') ctx:preface('local plugin = require("apisix.plugin")') ctx:preface('local tablepool = core.tablepool') ctx:preface('\n') local class_name, err = ctx:generate(data.rule, data.conf) if err then return nil, err end ctx:stmt('return ', class_name) return ctx, nil end return { generate = function(conf, options) local ctx, err = generate_ctx(conf, options) if not ctx then return nil, err end return ctx:as_lua(), nil end, }
-- dust animation.lua local newImage = love.graphics.newImage local Media = require("scripts.media") -- Run dust size local run_dust_width = 21.6 local run_dust_height = 18 local run_dust = "run_dust.png" local path = "res/gfx/SpriteSheets/player/" local run_dust = newImage(path .. run_dust) run_dust = Media.newAnimation(run_dust, run_dust_width, run_dust_height, 1, true)
AddCSLuaFile() SWEP.Author = "Divran" -- Originally by ShaRose, rewritten by Divran at 2011-04-03 SWEP.Contact = "" SWEP.Purpose = "Remote control for Pod Controllers in wire." SWEP.Instructions = "Left Click on Pod Controller to link up, and use to start controlling." SWEP.Category = "Wiremod" SWEP.PrintName = "Remote Control" SWEP.Slot = 0 SWEP.SlotPos = 4 SWEP.DrawAmmo = false SWEP.Weight = 1 SWEP.Spawnable = true SWEP.AdminOnly = false SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" SWEP.viewModel = "models/weapons/v_pistol.mdl" SWEP.worldModel = "models/weapons/w_pistol.mdl" if CLIENT then return end function SWEP:PrimaryAttack() local trace = self:GetOwner():GetEyeTrace() if IsValid(trace.Entity) and trace.Entity:GetClass() == "gmod_wire_pod" and gamemode.Call("PlayerUse", self:GetOwner(), trace.Entity) then self.Linked = trace.Entity self:GetOwner():ChatPrint("Remote Controller linked.") end end function SWEP:Holster() if (self.Linked) then self:Off() end return true end function SWEP:OnDrop() if (self.Linked) then self:Off() self.Linked = nil end end function SWEP:On() self.Active = true self.OldMoveType = self:GetOwner():GetMoveType() self:GetOwner():SetMoveType(MOVETYPE_NONE) self:GetOwner():DrawViewModel(false) if (self.Linked and self.Linked:IsValid()) then self.Linked:PlayerEntered( self:GetOwner(), self ) end end function SWEP:Off() if self.Active then self:GetOwner():SetMoveType(self.OldMoveType or MOVETYPE_WALK) end self.Active = nil self.OldMoveType = nil self:GetOwner():DrawViewModel(true) if (self.Linked and self.Linked:IsValid()) then self.Linked:PlayerExited( self:GetOwner() ) end end function SWEP:Think() if (!self.Linked) then return end if (self:GetOwner():KeyPressed( IN_USE )) then if (!self.Active) then self:On() else self:Off() end end end function SWEP:Deploy() return true end
-- Clipboard.lua -- Implements the cClipboard clas representing a player's clipboard --- Class for storing the player's clipboard cClipboard = {} function cClipboard:new(a_Obj) a_Obj = a_Obj or {} setmetatable(a_Obj, cClipboard) self.__index = self -- Initialize the object members: a_Obj.Area = cBlockArea() return a_Obj end --- Copies the blocks in the specified sorted cuboid into clipboard function cClipboard:Copy(a_World, a_Cuboid, a_Offset) assert(tolua.type(a_World) == "cWorld") assert(tolua.type(a_Cuboid) == "cCuboid") local Offset = a_Offset or Vector3i() self.Area:Read(a_World, a_Cuboid.p1.x, a_Cuboid.p2.x, a_Cuboid.p1.y, a_Cuboid.p2.y, a_Cuboid.p1.z, a_Cuboid.p2.z ) self.Area:SetWEOffset(Offset) return self.Area:GetVolume() end --- Cuts the blocks from the specified sorted cuboid into clipboard -- Replaces the cuboid with air blocks function cClipboard:Cut(a_World, a_Cuboid, a_Offset) self:Copy(a_World, a_Cuboid, a_Offset) -- Replace everything with air: local Area = cBlockArea() Area:Create(a_Cuboid:DifX() + 1, a_Cuboid:DifY() + 1, a_Cuboid:DifZ() + 1) Area:Write(a_World, a_Cuboid.p1.x, a_Cuboid.p1.y, a_Cuboid.p1.z) -- Wake up the simulators in the area: a_World:WakeUpSimulatorsInArea(cCuboid( Vector3i(a_Cuboid.p1.x - 1, a_Cuboid.p1.y - 1, a_Cuboid.p1.z - 1), Vector3i(a_Cuboid.p2.x + 1, a_Cuboid.p2.y + 1, a_Cuboid.p2.z + 1) )) return self.Area:GetVolume() end --- Returns the cuboid that holds the area which would be affected by a paste operation function cClipboard:GetPasteDestCuboid(a_Player, a_UseOffset) assert(tolua.type(a_Player) == "cPlayer") assert(self:IsValid()) local MinX, MinY, MinZ = math.floor(a_Player:GetPosX()), math.floor(a_Player:GetPosY()), math.floor(a_Player:GetPosZ()) if (a_UseOffset) then local Offset = self.Area:GetWEOffset() MinX = MinX + Offset.x MinY = MinY + Offset.y MinZ = MinZ + Offset.z end local XSize, YSize, ZSize = self.Area:GetSize() return cCuboid(Vector3i(MinX, MinY, MinZ), Vector3i(MinX + XSize, MinY + YSize, MinZ + ZSize)) end --- Returns a string describing the clipboard size -- Format: "X * Y * Z (volume: N blocks)" -- If the clipboard isn't valid, returns a placeholder text function cClipboard:GetSizeDesc() if not(self:IsValid()) then return "no clipboard data" end local XSize, YSize, ZSize = self.Area:GetSize() local Volume = XSize * YSize * ZSize local Dimensions = XSize .. " * " .. YSize .. " * " .. ZSize .. " (volume: " if (Volume == 1) then return Dimensions .. "1 block)" else return Dimensions .. Volume .. " blocks)" end end --- Returns true if there's any content in the clipboard function cClipboard:IsValid() return (self.Area:GetDataTypes() ~= 0) end --- Loads the specified schematic file into the clipboard -- Returns true if successful, false if not function cClipboard:LoadFromSchematicFile(a_FileName) return self.Area:LoadFromSchematicFile(a_FileName) end --- Pastes the clipboard contents into the world relative to the player -- a_DstPoint is the optional min-coord Vector3i where to paste; if not specified, the default is used -- Returns the number of blocks pasted function cClipboard:Paste(a_Player, a_DstPoint) local World = a_Player:GetWorld() -- Write the area: self.Area:Write(World, a_DstPoint.x, a_DstPoint.y, a_DstPoint.z) -- Wake up simulators in the area: local XSize, YSize, ZSize = self.Area:GetSize() World:WakeUpSimulatorsInArea(cCuboid( Vector3i(a_DstPoint.x - 1, a_DstPoint.y, a_DstPoint.z - 1), Vector3i(a_DstPoint.x + XSize + 1, a_DstPoint.y + YSize + 1, a_DstPoint.z + ZSize + 1) )) return XSize * YSize * ZSize end --- Rotates the clipboard around the Y axis the specified number of quarter-rotations (90 degrees) -- Positive number of rotations turn CCW, negative number of rotations turn CW -- Intelligent rotating - does CW instead of 3 CCW rotations etc. -- TODO: Also rotates the player-relative offsets function cClipboard:Rotate(a_NumCCWQuarterRotations) local NumRots = math.fmod(a_NumCCWQuarterRotations, 4) if ((NumRots == -3) or (NumRots == 1)) then -- 3 CW rotations = 1 CCW rotation self.Area:RotateCCW() elseif ((NumRots == -2) or (NumRots == 2)) then -- -2 or 2 rotations is the same, use any rotation function twice self.Area:RotateCCW() self.Area:RotateCCW() elseif ((NumRots == -1) or (NumRots == 3)) then -- 3 CCW rotation = 1 CW rotation self.Area:RotateCW() elseif (NumRots == 0) then -- No rotation needed else error("Bad fmod result: " .. NumRots) end end --- Saves the clipboard to the specified .schematic file -- Assumes the clipboard is valid -- Returns true on success, false on failure function cClipboard:SaveToSchematicFile(a_FileName) assert(self:IsValid()) return self.Area:SaveToSchematicFile(a_FileName) end
local helpers = require('test.functional.helpers')(after_each) local eq = helpers.eq local NIL = helpers.NIL local eval = helpers.eval local clear = helpers.clear local meths = helpers.meths local funcs = helpers.funcs local source = helpers.source local dedent = helpers.dedent local command = helpers.command local exc_exec = helpers.exc_exec local redir_exec = helpers.redir_exec local matches = helpers.matches describe(':echo :echon :echomsg :echoerr', function() local fn_tbl = {'String', 'StringN', 'StringMsg', 'StringErr'} local function assert_same_echo_dump(expected, input, use_eval) for _,v in pairs(fn_tbl) do eq(expected, use_eval and eval(v..'('..input..')') or funcs[v](input)) end end local function assert_matches_echo_dump(expected, input, use_eval) for _,v in pairs(fn_tbl) do matches(expected, use_eval and eval(v..'('..input..')') or funcs[v](input)) end end before_each(function() clear() source([[ function String(s) return execute('echo a:s')[1:] endfunction function StringMsg(s) return execute('echomsg a:s')[1:] endfunction function StringN(s) return execute('echon a:s') endfunction function StringErr(s) try execute 'echoerr a:s' catch return substitute(v:exception, '^Vim(echoerr):', '', '') endtry endfunction ]]) end) describe('used to represent floating-point values', function() it('dumps NaN values', function() assert_same_echo_dump("str2float('nan')", "str2float('nan')", true) end) it('dumps infinite values', function() assert_same_echo_dump("str2float('inf')", "str2float('inf')", true) assert_same_echo_dump("-str2float('inf')", "str2float('-inf')", true) end) it('dumps regular values', function() assert_same_echo_dump('1.5', 1.5) assert_same_echo_dump('1.56e-20', 1.56000e-020) assert_same_echo_dump('0.0', '0.0', true) end) it('dumps special v: values', function() eq('v:true', eval('String(v:true)')) eq('v:false', eval('String(v:false)')) eq('v:null', eval('String(v:null)')) eq('v:true', funcs.String(true)) eq('v:false', funcs.String(false)) eq('v:null', funcs.String(NIL)) eq('true', eval('StringMsg(v:true)')) eq('false', eval('StringMsg(v:false)')) eq('null', eval('StringMsg(v:null)')) eq('true', funcs.StringMsg(true)) eq('false', funcs.StringMsg(false)) eq('null', funcs.StringMsg(NIL)) eq('true', eval('StringErr(v:true)')) eq('false', eval('StringErr(v:false)')) eq('null', eval('StringErr(v:null)')) eq('true', funcs.StringErr(true)) eq('false', funcs.StringErr(false)) eq('null', funcs.StringErr(NIL)) end) it('dumps values with at most six digits after the decimal point', function() assert_same_echo_dump('1.234568e-20', 1.23456789123456789123456789e-020) assert_same_echo_dump('1.234568', 1.23456789123456789123456789) end) it('dumps values with at most seven digits before the decimal point', function() assert_same_echo_dump('1234567.891235', 1234567.89123456789123456789) assert_same_echo_dump('1.234568e7', 12345678.9123456789123456789) end) it('dumps negative values', function() assert_same_echo_dump('-1.5', -1.5) assert_same_echo_dump('-1.56e-20', -1.56000e-020) assert_same_echo_dump('-1.234568e-20', -1.23456789123456789123456789e-020) assert_same_echo_dump('-1.234568', -1.23456789123456789123456789) assert_same_echo_dump('-1234567.891235', -1234567.89123456789123456789) assert_same_echo_dump('-1.234568e7', -12345678.9123456789123456789) end) end) describe('used to represent numbers', function() it('dumps regular values', function() assert_same_echo_dump('0', 0) assert_same_echo_dump('-1', -1) assert_same_echo_dump('1', 1) end) it('dumps large values', function() assert_same_echo_dump('2147483647', 2^31-1) assert_same_echo_dump('-2147483648', -2^31) end) end) describe('used to represent strings', function() it('dumps regular strings', function() assert_same_echo_dump('test', 'test') end) it('dumps empty strings', function() assert_same_echo_dump('', '') end) it("dumps strings with ' inside", function() assert_same_echo_dump("'''", "'''") assert_same_echo_dump("a'b''", "a'b''") assert_same_echo_dump("'b''d", "'b''d") assert_same_echo_dump("a'b'c'd", "a'b'c'd") end) it('dumps NULL strings', function() assert_same_echo_dump('', '$XXX_UNEXISTENT_VAR_XXX', true) end) it('dumps NULL lists', function() assert_same_echo_dump('[]', 'v:_null_list', true) end) it('dumps NULL dictionaries', function() assert_same_echo_dump('{}', 'v:_null_dict', true) end) end) describe('used to represent funcrefs', function() before_each(function() source([[ function Test1() endfunction function s:Test2() dict endfunction function g:Test3() dict endfunction let g:Test2_f = function('s:Test2') ]]) end) it('dumps references to built-in functions', function() eq('function', eval('String(function("function"))')) eq("function('function')", eval('StringMsg(function("function"))')) eq("function('function')", eval('StringErr(function("function"))')) end) it('dumps references to user functions', function() eq('Test1', eval('String(function("Test1"))')) eq('g:Test3', eval('String(function("g:Test3"))')) eq("function('Test1')", eval("StringMsg(function('Test1'))")) eq("function('g:Test3')", eval("StringMsg(function('g:Test3'))")) eq("function('Test1')", eval("StringErr(function('Test1'))")) eq("function('g:Test3')", eval("StringErr(function('g:Test3'))")) end) it('dumps references to script functions', function() eq('<SNR>2_Test2', eval('String(Test2_f)')) eq("function('<SNR>2_Test2')", eval('StringMsg(Test2_f)')) eq("function('<SNR>2_Test2')", eval('StringErr(Test2_f)')) end) it('dump references to lambdas', function() assert_matches_echo_dump("function%('<lambda>%d+'%)", '{-> 1234}', true) end) it('dumps partials with self referencing a partial', function() source([[ function TestDict() dict endfunction let d = {} let TestDictRef = function('TestDict', d) let d.tdr = TestDictRef ]]) eq(dedent([[ function('TestDict', {'tdr': function('TestDict', {...@1})}) function('TestDict', {'tdr': function('TestDict', {...@1})})]]), redir_exec('echo String(d.tdr)')) end) it('dumps automatically created partials', function() assert_same_echo_dump( "function('<SNR>2_Test2', {'f': function('<SNR>2_Test2')})", '{"f": Test2_f}.f', true) assert_same_echo_dump( "function('<SNR>2_Test2', [1], {'f': function('<SNR>2_Test2', [1])})", '{"f": function(Test2_f, [1])}.f', true) end) it('dumps manually created partials', function() assert_same_echo_dump("function('Test3', [1, 2], {})", "function('Test3', [1, 2], {})", true) assert_same_echo_dump("function('Test3', [1, 2])", "function('Test3', [1, 2])", true) assert_same_echo_dump("function('Test3', {})", "function('Test3', {})", true) end) it('does not crash or halt when dumping partials with reference cycles in self', function() meths.set_var('d', {v=true}) eq(dedent([[ {'p': function('<SNR>2_Test2', {...@0}), 'f': function('<SNR>2_Test2'), 'v': v:true} {'p': function('<SNR>2_Test2', {...@0}), 'f': function('<SNR>2_Test2'), 'v': v:true}]]), redir_exec('echo String(extend(extend(g:d, {"f": g:Test2_f}), {"p": g:d.f}))')) end) it('does not show errors when dumping partials referencing the same dictionary', function() command('let d = {}') -- Regression for “eval/typval_encode: Dump empty dictionary before -- checking for refcycle”, results in error. eq('[function(\'tr\', {}), function(\'tr\', {})]', eval('String([function("tr", d), function("tr", d)])')) -- Regression for “eval: Work with reference cycles in partials (self) -- properly”, results in crash. eval('extend(d, {"a": 1})') eq('[function(\'tr\', {\'a\': 1}), function(\'tr\', {\'a\': 1})]', eval('String([function("tr", d), function("tr", d)])')) end) it('does not crash or halt when dumping partials with reference cycles in arguments', function() meths.set_var('l', {}) eval('add(l, l)') -- Regression: the below line used to crash (add returns original list and -- there was error in dumping partials). Tested explicitly in -- test/unit/api/private_helpers_spec.lua. eval('add(l, function("Test1", l))') eq(dedent([=[ function('Test1', [[[...@2], function('Test1', [[...@2]])], function('Test1', [[[...@4], function('Test1', [[...@4]])]])]) function('Test1', [[[...@2], function('Test1', [[...@2]])], function('Test1', [[[...@4], function('Test1', [[...@4]])]])])]=]), redir_exec('echo String(function("Test1", l))')) end) it('does not crash or halt when dumping partials with reference cycles in self and arguments', function() meths.set_var('d', {v=true}) meths.set_var('l', {}) eval('add(l, l)') eval('add(l, function("Test1", l))') eval('add(l, function("Test1", d))') eq(dedent([=[ {'p': function('<SNR>2_Test2', [[[...@3], function('Test1', [[...@3]]), function('Test1', {...@0})], function('Test1', [[[...@5], function('Test1', [[...@5]]), function('Test1', {...@0})]]), function('Test1', {...@0})], {...@0}), 'f': function('<SNR>2_Test2'), 'v': v:true} {'p': function('<SNR>2_Test2', [[[...@3], function('Test1', [[...@3]]), function('Test1', {...@0})], function('Test1', [[[...@5], function('Test1', [[...@5]]), function('Test1', {...@0})]]), function('Test1', {...@0})], {...@0}), 'f': function('<SNR>2_Test2'), 'v': v:true}]=]), redir_exec('echo String(extend(extend(g:d, {"f": g:Test2_f}), {"p": function(g:d.f, l)}))')) end) end) describe('used to represent lists', function() it('dumps empty list', function() assert_same_echo_dump('[]', {}) end) it('dumps non-empty list', function() assert_same_echo_dump('[1, 2]', {1,2}) end) it('dumps nested lists', function() assert_same_echo_dump('[[[[[]]]]]', {{{{{}}}}}) end) it('dumps nested non-empty lists', function() assert_same_echo_dump('[1, [[3, [[5], 4]], 2]]', {1, {{3, {{5}, 4}}, 2}}) end) it('does not error when dumping recursive lists', function() meths.set_var('l', {}) eval('add(l, l)') eq(0, exc_exec('echo String(l)')) end) it('dumps recursive lists without error', function() meths.set_var('l', {}) eval('add(l, l)') eq('\n[[...@0]]\n[[...@0]]', redir_exec('echo String(l)')) eq('\n[[[...@1]]]\n[[[...@1]]]', redir_exec('echo String([l])')) end) end) describe('used to represent dictionaries', function() it('dumps empty dictionary', function() assert_same_echo_dump('{}', '{}', true) end) it('dumps list with two same empty dictionaries, also in partials', function() command('let d = {}') assert_same_echo_dump('[{}, {}]', '[d, d]', true) eq('[function(\'tr\', {}), {}]', eval('String([function("tr", d), d])')) eq('[{}, function(\'tr\', {})]', eval('String([d, function("tr", d)])')) end) it('dumps non-empty dictionary', function() assert_same_echo_dump("{'t''est': 1}", {["t'est"]=1}) end) it('does not error when dumping recursive dictionaries', function() meths.set_var('d', {d=1}) eval('extend(d, {"d": d})') eq(0, exc_exec('echo String(d)')) end) it('dumps recursive dictionaries without the error', function() meths.set_var('d', {d=1}) eval('extend(d, {"d": d})') eq('\n{\'d\': {...@0}}\n{\'d\': {...@0}}', redir_exec('echo String(d)')) eq('\n{\'out\': {\'d\': {...@1}}}\n{\'out\': {\'d\': {...@1}}}', redir_exec('echo String({"out": d})')) end) end) describe('used to represent special values', function() local function chr(n) return ('%c'):format(n) end local function ctrl(c) return ('%c'):format(c:upper():byte() - 0x40) end it('displays hex as hex', function() -- Regression: due to missing (uint8_t) cast \x80 was represented as -- ~@<80>. eq('<80>', funcs.String(chr(0x80))) eq('<81>', funcs.String(chr(0x81))) eq('<8e>', funcs.String(chr(0x8e))) eq('<c2>', funcs.String(('«'):sub(1, 1))) eq('«', funcs.String(('«'):sub(1, 2))) eq('<80>', funcs.StringMsg(chr(0x80))) eq('<81>', funcs.StringMsg(chr(0x81))) eq('<8e>', funcs.StringMsg(chr(0x8e))) eq('<c2>', funcs.StringMsg(('«'):sub(1, 1))) eq('«', funcs.StringMsg(('«'):sub(1, 2))) end) it('displays ASCII control characters using ^X notation', function() eq('^C', funcs.String(ctrl('c'))) eq('^A', funcs.String(ctrl('a'))) eq('^F', funcs.String(ctrl('f'))) eq('^C', funcs.StringMsg(ctrl('c'))) eq('^A', funcs.StringMsg(ctrl('a'))) eq('^F', funcs.StringMsg(ctrl('f'))) end) it('prints CR, NL and tab as-is', function() eq('\n', funcs.String('\n')) eq('\r', funcs.String('\r')) eq('\t', funcs.String('\t')) end) it('prints non-printable UTF-8 in <> notation', function() -- SINGLE SHIFT TWO, unicode control eq('<8e>', funcs.String(funcs.nr2char(0x8E))) eq('<8e>', funcs.StringMsg(funcs.nr2char(0x8E))) -- Surrogate pair: U+1F0A0 PLAYING CARD BACK is represented in UTF-16 as -- 0xD83C 0xDCA0. This is not valid in UTF-8. eq('<d83c>', funcs.String(funcs.nr2char(0xD83C))) eq('<dca0>', funcs.String(funcs.nr2char(0xDCA0))) eq('<d83c><dca0>', funcs.String(funcs.nr2char(0xD83C) .. funcs.nr2char(0xDCA0))) eq('<d83c>', funcs.StringMsg(funcs.nr2char(0xD83C))) eq('<dca0>', funcs.StringMsg(funcs.nr2char(0xDCA0))) eq('<d83c><dca0>', funcs.StringMsg(funcs.nr2char(0xD83C) .. funcs.nr2char(0xDCA0))) end) end) end)
return { level = 44, need_exp = 45000, clothes_attrs = { 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, }, }
-- import local EntityModule = require 'candy.Entity' local Entity = EntityModule.Entity -- module local GlobalManagerModule = {} local rawget = rawget local _GlobalManagerRegistry = setmetatable ( {}, { __no_traverse = true } ) local function getGlobalManagerRegistry () return _GlobalManagerRegistry end ---@class GlobalManager local GlobalManager = CLASS: GlobalManager () :MODEL {} local _order = 0 local function _globlaManagerSortFunc ( a, b ) local pa = a._priority local pb = b._priority if pa < pb then return true end if pb < pa then return false end return a._order < b._order end function GlobalManager:__init () self._priority = self:getPriority () assert ( not rawget ( self.__class, "_singleton" ) ) rawset ( self.__class, "_singleton", self ) self._order = _order _order = _order + 1 local key = self:getKey () if not key then return end for i, m in ipairs ( _GlobalManagerRegistry ) do if m:getKey () == key then _warn ( "duplciated global manager, overwrite", key ) _GlobalManagerRegistry[ i ] = self return end end table.insert ( _GlobalManagerRegistry, self ) table.sort ( _GlobalManagerRegistry, _globlaManagerSortFunc ) end function GlobalManager.get ( clas ) return rawget ( clas, "_singleton" ) end function GlobalManager:getKey () return self:getClassName () end function GlobalManager:getPriority () return 0 end function GlobalManager:needUpdate () return true end function GlobalManager:postInit ( game ) end function GlobalManager:preInit ( game ) end function GlobalManager:onInit ( game ) end function GlobalManager:onStart ( game ) end function GlobalManager:postStart ( game ) end function GlobalManager:onStop ( game ) end GlobalManager.onUpdate = false function GlobalManager:saveConfig () end function GlobalManager:loadConfig ( configData ) end function GlobalManager:onSceneInit ( scene ) end function GlobalManager:onSceneReset ( scene ) end function GlobalManager:onSceneClear ( scene ) end function GlobalManager:onSceneStart ( scene ) end function GlobalManager:postSceneStart ( scene ) end function GlobalManager:preSceneSave ( scene ) end function GlobalManager:onSceneSave ( scene ) end function GlobalManager:preSceneLoad ( scene ) end function GlobalManager:onSceneLoad ( scene ) end GlobalManagerModule.GlobalManager = GlobalManager GlobalManagerModule.getGlobalManagerRegistry = getGlobalManagerRegistry return GlobalManagerModule
--init require "resty.core" -- construct a new object - twaf_config local twaf_config_m = require "lib.twaf.twaf_conf" local twaf_config = twaf_config_m:new() twaf_config:load_default_config("/opt/OpenWAF/conf/twaf_default_conf.json") twaf_config:load_access_rule("/opt/OpenWAF/conf/twaf_access_rule.json") twaf_config:load_policy_config("/opt/OpenWAF/conf", {twaf_policy_conf = 1}) twaf_config:load_rules() -- GeoIP twaf_config:load_geoip_country_ipv4("/opt/OpenWAF/lib/twaf/inc/knowledge_db/geo_country/GeoIP.dat") twaf_config:load_geoip_country_ipv6("/opt/OpenWAF/lib/twaf/inc/knowledge_db/geo_country/GeoIPv6.dat") local twaf_reqstat_m = require "lib.twaf.twaf_reqstat" twaf_reqstat = twaf_reqstat_m:new(twaf_config.twaf_default_conf.twaf_reqstat, twaf_config.twaf_policy.policy_uuids) -- construct a new object - twaf local twaf_lib = require "lib.twaf.twaf_core" twaf = twaf_lib:new(twaf_config) local default_init_register = twaf:get_default_config_param("init_register") twaf:register_modules(default_init_register)
local M = {} local session = require('possession.session') local display = require('possession.display') local paths = require('possession.paths') local migrate = require('possession.migrate') local utils = require('possession.utils') local function complete_list(candidates, opts) opts = vim.tbl_extend('force', { sort = true, }, opts or {}) vim.validate { candidates = { candidates, utils.is_type { 'table', 'function' } } } local get_candidates = function() local list = type(candidates) == 'function' and candidates() or candidates if opts.sort then table.sort(list) end return list end return function(arg_lead, cmd_line, cursor_pos) return vim.tbl_filter(function(c) return vim.startswith(c, arg_lead) end, get_candidates()) end end -- Limits filesystem access by caching the results by time M.complete_session = complete_list(utils.throttle(function() local files = vim.tbl_keys(session.list { no_read = true }) return vim.tbl_map(paths.session_name, files) end, 3000)) local function get_name(name) if not name or name == '' then local path = session.last() if not path then utils.error('Cannot find last loaded session name') return nil end name = paths.session_name(path) end return name end function M.save(name, no_confirm) local name = get_name(name) if name then session.save(name, { no_confirm = no_confirm }) end end function M.load(name) local name = get_name(name) if name then session.load(name) end end function M.delete(name) local name = get_name(name) if name then session.delete(name) end end function M.show(name) local name = get_name(name) if not name then return end local path = paths.session(name) local data = vim.json.decode(path:read()) data.file = path:absolute() local buf = vim.api.nvim_create_buf(false, true) vim.api.nvim_buf_set_option(buf, 'bufhidden', 'wipe') display.in_buffer(data, buf) vim.api.nvim_win_set_buf(0, buf) end function M.list(full) display.echo_sessions { vimscript = full } end function M.migrate(path) if vim.fn.getftype(path) == 'file' then migrate.migrate(path) else migrate.migrate_dir(path) end end return M
local function Progress() return [[%3P]] end return Progress
object_ship_nova_orion_pirate_light_tier9 = object_ship_shared_nova_orion_pirate_light_tier9:new { } ObjectTemplates:addTemplate(object_ship_nova_orion_pirate_light_tier9, "object/ship/nova_orion_pirate_light_tier9.iff")
--[[ --MIT License -- --Copyright (c) 2019 manilarome --Copyright (c) 2020 Tom Meyers -- --Permission is hereby granted, free of charge, to any person obtaining a copy --of this software and associated documentation files (the "Software"), to deal --in the Software without restriction, including without limitation the rights --to use, copy, modify, merge, publish, distribute, sublicense, and/or sell --copies of the Software, and to permit persons to whom the Software is --furnished to do so, subject to the following conditions: -- --The above copyright notice and this permission notice shall be included in all --copies or substantial portions of the Software. -- --THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR --IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, --FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE --AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER --LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, --OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE --SOFTWARE. ]] -- this file is the "daemon" part that hooks directly into TDE -- A helper script should use this file as the following: -- tde-client "_G.dev_widget_refresh('the.import.location.of.the.new.widget')" -- This will update the widget that is in that file -- you can hook this up to an inotify script to auto load the widget :) local awful = require("awful") local wibox = require("wibox") local beautiful = require("beautiful") local dpi = beautiful.xresources.apply_dpi local filehandle = require("lib-tde.file") local icons = require("theme.icons") local gears = require("gears") local m = dpi(10) local dev_widget_update_close_height = dpi(60) -- Create dev_widget on every screen screen.connect_signal( "request::desktop_decoration", function(scr) local divercence = m * 5 local hub = wibox( { ontop = true, visible = false, type = "toolbar", bg = beautiful.background.hue_800, width = (scr.workarea.width / 2) - divercence, height = scr.workarea.height, x = scr.workarea.x + (scr.workarea.width / 2) + divercence, y = scr.workarea.y, screen = scr } ) local view_container = wibox.layout.flex.vertical() view_container.spacing = m _G.dev_widget_side_view_refresh = function(widget_path) local original_path = package.path local require_str = "calendar-widget" if widget_path then local dir = filehandle.dirname(widget_path) package.path = dir .. "?.lua;" .. dir .. "?/?.lua;" .. package.path require_str = filehandle.basename(widget_path) end view_container:reset() view_container:add(require(require_str)) hub.visible = true package.path = original_path end local function close_hub() hub.visible = false -- remove the widget in the container -- as it is a developer widget and can cause memory and cpu leaks view_container:reset() -- we also perform a garbage collection cycle as we don't know what happens with the widget collectgarbage("collect") end local close = wibox.widget.imagebox(icons.close) close.forced_height = dev_widget_update_close_height close:buttons(gears.table.join(awful.button({}, 1, close_hub))) local close_button = wibox.container.place(close, "right") hub:setup { layout = wibox.layout.fixed.vertical, close_button, view_container } end )
hook.Add("PostGamemodeLoaded", "BetterVoteSystem_PostGamemodeLoaded", function () if BetterVoteSystem.CheckOnInterval == false then return end timer.Create("BetterVoteSystem_CheckVoteInterval", BetterVoteSystem.CheckInterval, 0, function() for k, v in pairs ( player.GetAll() ) do http.Fetch('https://gmod-servers.com/api/?object=votes&element=claim&key='..BetterVoteSystem.ServerToken..'&steamid='..v:SteamID64(), function(body, size, headers, code) if body != 1 then return end http.Fetch('https://gmod-servers.com/api/?action=post&object=votes&element=claim&key='..BetterVoteSystem.ServerToken..'&steamid='..v:SteamID64(), function(body1, size1, headers1, code1) if body1 == 0 then return end BetterVoteSystem.GiveReward(ply) end, BetterVoteSystem.httpError) end, BetterVoteSystem.httpError) end end) end) hook.Add("PlayerInitialSpawn", "BetterVoteSystem_PlayerInitialSpawn", function(ply, transition) http.Fetch('https://gmod-servers.com/api/?object=votes&element=claim&key='..BetterVoteSystem.ServerToken..'&steamid='..ply:SteamID64(), function(body, size, headers, code) if body != 1 then return end http.Fetch('https://gmod-servers.com/api/?action=post&object=votes&element=claim&key='..BetterVoteSystem.ServerToken..'&steamid='..ply:SteamID64(), function(body1, size1, headers1, code1) if body1 == 0 then return end BetterVoteSystem.GiveReward(ply) end, BetterVoteSystem.httpError) end, BetterVoteSystem.httpError) end)
FAdmin = FAdmin or {} FAdmin.PlayerActions = FAdmin.PlayerActions or {} FAdmin.StartHooks = FAdmin.StartHooks or {} /* Utilities! */ function FAdmin.FindPlayer(info) if not info then return nil end local pls = player.GetAll() local found = {} if string.lower(info) == "*" or string.lower(info) == "<all>" then return pls end local InfoPlayers = {} for A in string.gmatch(info..";", "([a-zA-Z0-9:_.]*)[;(,%s)%c]") do if A ~= "" then table.insert(InfoPlayers, A) end end for _, PlayerInfo in pairs(InfoPlayers) do -- Playerinfo is always to be treated as UserID when it's a number -- otherwise people with numbers in their names could get confused with UserID's of other players if tonumber(PlayerInfo) then if IsValid(Player(PlayerInfo)) and not found[Player(PlayerInfo)] then found[Player(PlayerInfo)] = true end continue end for k, v in pairs(pls) do -- Find by Steam ID if (PlayerInfo == v:SteamID() or v:SteamID() == "UNKNOWN") and not found[v] then found[v] = true end -- Find by Partial Nick if string.find(string.lower(v:Name()), string.lower(tostring(PlayerInfo)), 1, true) ~= nil and not found[v] then found[v] = true end if v.SteamName and string.find(string.lower(v:SteamName()), string.lower(tostring(PlayerInfo)), 1, true) ~= nil and not found[v] then found[v] = true end end end local players = {} local empty = true for k, v in pairs(found or {}) do empty = false table.insert(players, k) end return empty and nil or players end function FAdmin.SteamToProfile(ply) -- Thanks decodaman return "http://steamcommunity.com/profiles/" .. (ply:SteamID64() or "BOT") end hook.Add("CanTool", "EntityCanTool", function(ply, trace, mode) if trace.Entity.CanTool and not FPP then return trace.Entity:CanTool(ply, trace, mode) end end) hook.Add("PhysgunPickup", "EntityPhysgunPickup", function(ply, ent) if ent.PhysgunPickup and not FPP then --FPP has this function too return ent:PhysgunPickup(ply) end end) hook.Add("OnPhysgunFreeze", "EntityPhysgunFreeze", function(weapon, physobj, ent, ply, ...) if ent.OnPhysgunFreeze and not FPP then return ent:OnPhysgunFreeze(weapon, physobj, ent, ply, ...) end end) /* FAdmin global settings */ FAdmin.GlobalSetting = FAdmin.GlobalSetting or {} FindMetaTable("Player").FAdmin_GetGlobal = function(self, setting) return self.GlobalSetting and self.GlobalSetting[setting] end /*Dependency solver: Many plugins are dependant of one another. To prevent plugins calling functions from other plugins that haven't been opened yet there will be a hook that is called when all plugins are loaded. This way there will be no hassle with which plugin loads first, which one next etc. */ timer.Simple(0, function() for k,v in pairs(FAdmin.StartHooks) do if type(k) ~= "string" then FAdmin.StartHooks[k] = nil end end for k,v in SortedPairs(FAdmin.StartHooks) do v() end end) hook.Add("InitPostEntity", "FAdmin_DarkRP_privs", function() if not FAdmin or not FAdmin.StartHooks then return end FAdmin.Access.AddPrivilege("rp_commands", 2) FAdmin.Access.AddPrivilege("rp_doorManipulation", 3) FAdmin.Access.AddPrivilege("rp_tool", 2) FAdmin.Access.AddPrivilege("rp_phys", 2) FAdmin.Access.AddPrivilege("rp_prop", 2) for k,v in pairs(RPExtraTeams) do if v.vote then FAdmin.Access.AddPrivilege("rp_"..v.command, (v.admin or 0) + 2) -- Add privileges for the teams that are voted for end end end)
-- -------------------- -- TellMeWhen -- Originally by Nephthys of Hyjal <lieandswell@yahoo.com> -- Other contributions by: -- Sweetmms of Blackrock, Oozebull of Twisting Nether, Oodyboo of Mug'thol, -- Banjankri of Blackrock, Predeter of Proudmoore, Xenyr of Aszune -- Currently maintained by -- Cybeloras of Aerie Peak/Detheroc/Mal'Ganis -- -------------------- if not TMW then return end local TMW = TMW local L = TMW.L local print = TMW.print -- The point of this module is to expose the icon itself to the -- anchorable frames list. local Module = TMW:NewClass("IconModule_Self", "IconModule") Module:SetAllowanceForType("", false) Module:RegisterAnchorableFrame("Icon") function Module:OnNewInstance(icon) _G[self:GetChildNameBase() .. "Icon"] = icon end
local TooltipMixin, Tooltip = {} local frame = CreateFrame("frame") frame:RegisterEvent "ADDON_LOADED" frame:SetScript("OnEvent", function(this, event, ...) Tooltip[event](Quest, ...) end) local SpecMap = { [250] = "Blood Death Knight", [251] = "Frost Death Knight", [252] = "Unholy Death Knight", [577] = "Havoc Demon Hunter", [581] = "Vengeance Demon Hunter", [102] = "Balance Druid", [103] = "Feral Druid", [104] = "Guardian Druid", [105] = "Restoration Druid", [253] = "Beast Mastery Hunter", [254] = "Marksmanship Hunter", [255] = "Survival Hunter", [62] = "Arcane Mage", [63] = "Fire Mage", [64] = "Frost Mage", [268] = "Brewmaster Monk", [270] = "Mistweaver Monk", [269] = "Windwalker Monk", [65] = "Holy Paladin", [66] = "Protection Paladin", [70] = "Retribution Paladin", [256] = "Discipline Priest", [257] = "Holy Priest", [258] = "Shadow Priest", [259] = "Assassination Rogue", [260] = "Outlaw Rogue", [261] = "Subtlety Rogue", [262] = "Elemental Shaman", [263] = "Enhancement Shaman", [264] = "Restoration Shamana", [265] = "Affliction Warlock", [266] = "Demonology Warlock", [267] = "Destruction Warlock", [71] = "Arms Warrior", [72] = "Fury Warrior", [73] = "Protection Warrior" } function TooltipMixin:ADDON_LOADED(name) -- Disabling for now until I can get useful info from a Trainer API -- if name == "Blizzard_TrainerUI" then -- hooksecurefunc("ClassTrainerFrame_SetServiceButton", function(...) Tooltip:OnClassTrainerFrameSetServiceButton(...) end) -- end end function TooltipMixin:OnLoad() -- TODO: Add Debug enable option setting GameTooltip:HookScript("OnTooltipSetItem", function (...) Tooltip:OnTooltipSetItem(...) end) ItemRefTooltip:HookScript("OnTooltipSetItem", function(...) Tooltip:OnTooltipSetItem(...) end) hooksecurefunc("BattlePetToolTip_Show", function (...) Tooltip:OnBattlePetTooltipShow(...) end) hooksecurefunc("FloatingBattlePet_Show", function(...) Tooltip:OnFloatingBattlePetShow(...) end) hooksecurefunc("GameTooltip_AddQuestRewardsToTooltip", function(...) Tooltip:OnGameTooltipAddQuestRewardsToTooltip(...) end) -- For embedded items (for quests, at least) hooksecurefunc("EmbeddedItemTooltip_OnTooltipSetItem", function(...) Tooltip:OnEmbeddedItemTooltipSetItem(...) end) -- hooksecurefunc("TaskPOI_OnEnter", function(...) Tooltip:OnTaskPOIOnEnter(...) end) -- Show missing info in tooltips -- NOTE: This causes a bug with tooltip scanning, so we disable -- briefly and turn it back on with each scan. C_TransmogCollection.SetShowMissingSourceInItemTooltips(true) SetCVar("missingTransmogSourceInItemTooltips", 1) -- May need this for inner items but has same item reference in current tests resulting in double -- ItemRefTooltip:HookScript("OnShow", function (tooltip, ...) Tooltip:OnTooltipSetItem(tooltip, ...) end) -- TODO: Can hook spell in same way if needed... -- GameTooltip:HookScript("OnTooltipSetSpell", OnTooltipSetSpell) -- ItemRefTooltip:HookScript("OnTooltipSetSpell", OnTooltipSetSpell) end -- function TooltipMixin:OnTaskPOIOnEnter(taskPOI, skipSetOwner) -- if not HaveQuestData(taskPOI.questID) then -- return -- retrieving item data -- end -- if C_QuestLog.IsQuestReplayable(taskPOI.questID) then -- itemLink = QuestUtils_GetReplayQuestDecoration(taskPOI.questID) -- else -- itemLink = GetQuestLink(taskPOI.questID) -- end -- local item = CaerdonItem:CreateFromItemLink(itemLink) -- Tooltip:ProcessTooltip(GameTooltip, item) -- GameTooltip.recalculatePadding = true; -- -- GameTooltip:SetHeight(GameTooltip:GetHeight() + 2) -- end function TooltipMixin:OnGameTooltipAddQuestRewardsToTooltip(tooltip, questID, style) local itemLink = GetQuestLink(questID) -- TODO: This happens with assault quests, at least... need to look into more if itemLink then local item = CaerdonItem:CreateFromItemLink(itemLink) Tooltip:ProcessTooltip(tooltip, item) end end function TooltipMixin:OnEmbeddedItemTooltipSetItem(tooltip) if tooltip.itemID then local item = CaerdonItem:CreateFromItemID(tooltip.itemID) Tooltip:ProcessTooltip(tooltip.Tooltip, item, true) end end function TooltipMixin:OnTooltipSetItem(tooltip) local itemName, itemLink = tooltip:GetItem() if itemLink then local item = CaerdonItem:CreateFromItemLink(itemLink) Tooltip:ProcessTooltip(tooltip, item) end end -- This works but can't seem to do anything useful to get item info with the index (yet) -- function TooltipMixin:OnClassTrainerFrameSetServiceButton(skillButton, skillIndex, playerMoney, selected, isTradeSkill) -- if not skillButton.caerdonTooltipHooked then -- skillButton.caerdonTooltipHooked = true -- skillButton:HookScript("OnEnter", function (button, ...) -- print(button:GetID()) -- end) -- end -- end function TooltipMixin:OnBattlePetTooltipShow(speciesID, level, quality, health, power, speed, customName) local item = CaerdonItem:CreateFromSpeciesInfo(speciesID, level, quality, health, power, speed, customName) Tooltip:ProcessTooltip(BattlePetTooltip, item) end function TooltipMixin:OnFloatingBattlePetShow(speciesID, level, quality, health, power, speed, customName, petID) -- Not sure where all this is used - definitely when hyperlinking the Pet Cage. Maybe AH? -- TODO: If name comes in blank, I think there might be some logic to use it when customName isn't set. if not CaerdonWardrobeConfig.Debug.Enabled then -- Not doing anything other than debug for tooltips right now return end local tooltip = FloatingBattlePetTooltip local ownedText = tooltip.Owned:GetText() or "" local origHeight = tooltip.Owned:GetHeight() tooltip.Owned:SetWordWrap(true) local extraText = "Caerdon Wardrobe|n" local englishFaction = UnitFactionGroup("player") local specIndex = GetSpecialization() local specID, specName, specDescription, specIcon, specBackground, specRole, specPrimaryStat = GetSpecializationInfo(specIndex) extraText = extraText .. format("Spec: %s", SpecMap[specID] or specID) extraText = extraText .. format("|nLevel: %s", UnitLevel("player")) extraText = extraText .. format("|nFaction: %s|n", englishFaction) local item = CaerdonItem:CreateFromSpeciesInfo(speciesID, level, quality, health, power, speed, customName, petID) if item then local itemData = item:GetItemData() extraText = extraText .. format("|nIdentified Type: %s", item:GetCaerdonItemType()) local forDebugUse = item:GetForDebugUse() extraText = extraText .. format("|nLink Type: %s", forDebugUse.linkType) extraText = extraText .. format("|nOptions: %s|n", forDebugUse.linkOptions) if item:GetCaerdonItemType() == CaerdonItemType.BattlePet then local petInfo = itemData and itemData:GetBattlePetInfo() if petInfo then extraText = extraText .. format("|nSpecies ID: %s", petInfo.speciesID) extraText = extraText .. format("|nNum Collected: %s", petInfo.numCollected) end end end local ownedLine = format("%s|n%s", ownedText, extraText) tooltip.Owned:SetText(ownedLine) tooltip:SetHeight(tooltip:GetHeight() + tooltip.Owned:GetHeight() - origHeight + 2) tooltip.Delimiter:ClearAllPoints(); tooltip.Delimiter:SetPoint("TOPLEFT", tooltip.Owned, "BOTTOMLEFT", -6, -2) end function TooltipMixin:AddTooltipData(tooltip, title, value, valueColor) local noWrap = false; local wrap = true; valueColor = valueColor or HIGHLIGHT_FONT_COLOR if not title then GameTooltip_AddErrorLine(tooltip, format("Dev Error", "Missing Title")); return end if title and value == nil then GameTooltip_AddErrorLine(tooltip, format("Missing %s", title)); elseif tooltip == BattlePetTooltip or tooltip == FloatingBattlePetTooltip then -- assuming this for now GameTooltip_AddColoredLine(tooltip, format("%s: %s", title, value), HIGHLIGHT_FONT_COLOR, wrap) else GameTooltip_AddColoredDoubleLine(tooltip, format("%s:", title), tostring(value), HIGHLIGHT_FONT_COLOR, valueColor, wrap); end end function TooltipMixin:AddTooltipDoubleData(tooltip, title, value, title2, value2, valueColor) local noWrap = false; local wrap = true; valueColor = valueColor or HIGHLIGHT_FONT_COLOR if not title or not title2 then GameTooltip_AddErrorLine(tooltip, format("Dev Error", "Missing Title")); return end if value == nil then GameTooltip_AddErrorLine(tooltip, format("Missing %s", title)); end if value2 == nil then GameTooltip_AddErrorLine(tooltip, format("Missing %s", title2)); end if value ~= nil and value2 ~= nil then if tooltip == BattlePetTooltip or tooltip == FloatingBattlePetTooltip then -- assuming this for now GameTooltip_AddColoredLine(tooltip, format("%s: %s", title, value), HIGHLIGHT_FONT_COLOR, wrap) GameTooltip_AddColoredLine(tooltip, format("%s: %s", title2, value2), HIGHLIGHT_FONT_COLOR, wrap) else GameTooltip_AddColoredDoubleLine(tooltip, format("%s / %s:", title, title2), format("%s / %s", value, value2), HIGHLIGHT_FONT_COLOR, valueColor, wrap); end elseif value ~= nil then if tooltip == BattlePetTooltip or tooltip == FloatingBattlePetTooltip then -- assuming this for now GameTooltip_AddColoredLine(tooltip, format("%s: %s", title, value), HIGHLIGHT_FONT_COLOR, wrap) else GameTooltip_AddColoredDoubleLine(tooltip, format("%s:", title), tostring(value), HIGHLIGHT_FONT_COLOR, valueColor, wrap); end elseif value2 ~= nil then if tooltip == BattlePetTooltip or tooltip == FloatingBattlePetTooltip then -- assuming this for now GameTooltip_AddColoredLine(tooltip, format("%s: %s", title, value2), HIGHLIGHT_FONT_COLOR, wrap) else GameTooltip_AddColoredDoubleLine(tooltip, format("%s:", title), tostring(value2), HIGHLIGHT_FONT_COLOR, valueColor, wrap); end end end -- local cancelFuncs = {} function TooltipMixin:ProcessTooltip(tooltip, item, isEmbedded) -- if cancelFuncs[tooltip] then -- cancelFuncs[tooltip]() -- cancelFuncs[tooltip] = nil -- end -- function continueLoad() if not CaerdonWardrobeConfig.Debug.Enabled then -- Not doing anything other than debug for tooltips right now return end GameTooltip_AddBlankLineToTooltip(tooltip); GameTooltip_AddColoredLine(tooltip, "Caerdon Wardrobe", LIGHTBLUE_FONT_COLOR); if not isEmbedded then local specIndex = GetSpecialization() local specID, specName, specDescription, specIcon, specBackground, specRole, specPrimaryStat = GetSpecializationInfo(specIndex) self:AddTooltipData(tooltip, "Spec", SpecMap[specID] or specID) self:AddTooltipData(tooltip, "Level", UnitLevel("player")) local englishFaction = UnitFactionGroup("player") self:AddTooltipData(tooltip, "Faction", englishFaction) GameTooltip_AddBlankLineToTooltip(tooltip); end local forDebugUse = item:GetForDebugUse() local identifiedType = item:GetCaerdonItemType() local identifiedColor = GREEN_FONT_COLOR if identifiedType == CaerdonItemType.Unknown then identifiedColor = RED_FONT_COLOR end self:AddTooltipData(tooltip, "Identified Type", identifiedType, identifiedColor) self:AddTooltipDoubleData(tooltip, "Link Type", forDebugUse.linkType, "Options", forDebugUse.linkOptions) if item:GetItemQuality() then self:AddTooltipData(tooltip, "Quality", _G[format("ITEM_QUALITY%d_DESC", item:GetItemQuality())], item:GetItemQualityColor().color) end GameTooltip_AddBlankLineToTooltip(tooltip); if identifiedType ~= CaerdonItemType.BattlePet and identifiedType ~= CaerdonItemType.Quest then self:AddTooltipData(tooltip, "Item ID", item:GetItemID()) self:AddTooltipDoubleData(tooltip, "Item Type", item:GetItemType(), "SubType", item:GetItemSubType()) self:AddTooltipDoubleData(tooltip, "Item Type ID", item:GetItemTypeID(), "SubType ID", item:GetItemSubTypeID()) self:AddTooltipData(tooltip, "Binding", item:GetBinding()) GameTooltip_AddBlankLineToTooltip(tooltip); self:AddTooltipData(tooltip, "Expansion ID", item:GetExpansionID()) self:AddTooltipData(tooltip, "Is Crafting Reagent", tostring(item:GetIsCraftingReagent())) end -- All data from here on out should come from the API -- TODO: Add additional option to show item link since it's so large? -- self:AddTooltipData(tooltip, "Item Link", gsub(item:GetItemLink(), "\124", "\124\124")) if identifiedType == CaerdonItemType.BattlePet or identifiedType == CaerdonItemType.CompanionPet then self:AddPetInfoToTooltip(tooltip, item) elseif identifiedType == CaerdonItemType.Equipment then self:AddTransmogInfoToTooltip(tooltip, item) end -- end -- if item:IsItemEmpty() then -- continueLoad() -- else -- cancelFuncs[tooltip] = item:ContinueWithCancelOnItemLoad(continueLoad) -- end end function TooltipMixin:AddPetInfoToTooltip(tooltip, item) local itemType = item:GetCaerdonItemType() if itemType ~= CaerdonItemType.BattlePet and itemType ~= CaerdonItemType.CompanionPet then return end local itemData = item:GetItemData() if itemType == CaerdonItemType.CompanionPet then GameTooltip_AddBlankLineToTooltip(tooltip); local petInfo = itemData:GetCompanionPetInfo() local speciesID = petInfo.speciesID self:AddTooltipData(tooltip, "Species ID", speciesID) self:AddTooltipData(tooltip, "Num Collected", petInfo.numCollected or 0) self:AddTooltipData(tooltip, "Pet Type", petInfo.petType) self:AddTooltipData(tooltip, "Source", petInfo.sourceText) elseif itemType == CaerdonItemType.BattlePet then local petInfo = itemData:GetBattlePetInfo() local speciesID = petInfo.speciesID self:AddTooltipData(tooltip, "Species ID", petInfo.speciesID) self:AddTooltipData(tooltip, "Num Collected", petInfo.numCollected or 0) end end function TooltipMixin:AddTransmogInfoToTooltip(tooltip, item) local itemData = item:GetItemData() local transmogInfo = itemData:GetTransmogInfo() self:AddTooltipData(tooltip, "Item Equip Location", item:GetEquipLocation()) if item:GetSetID() then self:AddTooltipData(tooltip, "Item Set ID", item:GetSetID()) end local equipmentSets = itemData:GetEquipmentSets() if equipmentSets then local setNames = equipmentSets[1] for setIndex = 2, #equipmentSets do setNames = setNames .. ", " .. equipmentSets[setIndex] end self:AddTooltipData(tooltip, "Equipment Sets", setNames) end if transmogInfo.isTransmog then self:AddTooltipData(tooltip, "Appearance ID", transmogInfo.appearanceID) self:AddTooltipData(tooltip, "Source ID", transmogInfo.sourceID) GameTooltip_AddBlankLineToTooltip(tooltip); self:AddTooltipData(tooltip, "Needs Item", transmogInfo.needsItem) self:AddTooltipData(tooltip, "Other Needs Item", transmogInfo.otherNeedsItem) self:AddTooltipData(tooltip, "Is Completionist Item", transmogInfo.isCompletionistItem) self:AddTooltipData(tooltip, "Matches Loot Spec", transmogInfo.matchesLootSpec) local requirementsColor = (transmogInfo.hasMetRequirements == false and RED_FONT_COLOR) or nil self:AddTooltipData(tooltip, "Has Met Requirements", transmogInfo.hasMetRequirements, requirementsColor) self:AddTooltipData(tooltip, "Item Min Level", item:GetMinLevel()) self:AddTooltipData(tooltip, "Can Equip", transmogInfo.canEquip) local matchedSources = transmogInfo.forDebugUseOnly.matchedSources self:AddTooltipData(tooltip, "Matched Source", matchedSources and #matchedSources > 0) local appearanceInfo = transmogInfo.forDebugUseOnly.appearanceInfo if appearanceInfo then GameTooltip_AddBlankLineToTooltip(tooltip); self:AddTooltipData(tooltip, "Appearance Collected", appearanceInfo.appearanceIsCollected) self:AddTooltipData(tooltip, "Source Collected", appearanceInfo.sourceIsCollected) self:AddTooltipData(tooltip, "Is Conditionally Known", appearanceInfo.sourceIsCollectedConditional) self:AddTooltipData(tooltip, "Is Permanently Known", appearanceInfo.sourceIsCollectedPermanent) self:AddTooltipData(tooltip, "Has Non-level Reqs", appearanceInfo.appearanceHasAnyNonLevelRequirements) self:AddTooltipData(tooltip, "Meets Non-level Reqs", appearanceInfo.appearanceMeetsNonLevelRequirements) self:AddTooltipData(tooltip, "Appearance Is Usable", appearanceInfo.appearanceIsUsable) self:AddTooltipData(tooltip, "Meets Condition", appearanceInfo.meetsTransmogPlayerCondition) else end end end Tooltip = CreateFromMixins(TooltipMixin) Tooltip:OnLoad()
return require "log.writer.stdout"
ModifyEvent(-2, -2, -1, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2); jyx2_ReplaceSceneObject("", "Dynamic/蓝花", ""); AddItem(173, 1); do return end;
ENT.Type = "anim" ENT.PrintName = "Modular Item Base" ENT.Author = "King David" ENT.Contact = "" ENT.Category = "wiltOS Technologies" ENT.Spawnable = false ENT.AdminSpawnable = false function ENT:SetupDataTables() self:NetworkVar( "String", 0, "ItemName" ) self:NetworkVar( "String", 1, "ItemDescription" ) self:NetworkVar( "String", 2, "RarityName" ) self:NetworkVar( "Int", 0, "ItemType" ) self:NetworkVar( "Int", 1, "Amount" ) self:NetworkVar( "Vector", 0, "RColor" ) end
local assert = assert -- Same value ---------------------------------------------------------------- -- 1. Store with same ref and same value. -- 2nd store eliminated. All stores in loop eliminated. do local t = { 1, 2 } for i=1,100 do t[1] = 11 assert(t[1] == 11) t[1] = 11 assert(t[1] == 11) end assert(t[1] == 11) end -- 2. Store with different tab, same idx and same value. -- All stores in loop eliminated. do local t1 = { 1, 2 } local t2 = { 1, 2 } for i=1,100 do t1[1] = 11 assert(t1[1] == 11) t2[1] = 11 assert(t2[1] == 11) end assert(t1[1] == 11) assert(t2[1] == 11) end -- 3. Store with same tab, different const idx and same value. -- All stores in loop eliminated. Also disambiguated. do local t = { 1, 2 } for i=1,100 do t[1] = 11 assert(t[1] == 11) t[2] = 11 assert(t[2] == 11) end assert(t[1] == 11) assert(t[2] == 11) end -- 4. Store with different tab, different const idx and same value. -- All stores in loop eliminated. Also disambiguated. do local t1 = { 1, 2 } local t2 = { 1, 2 } for i=1,100 do t1[1] = 11 assert(t1[1] == 11) t2[2] = 11 assert(t2[2] == 11) end assert(t1[1] == 11) assert(t2[2] == 11) end -- 5. Store with different tab, different non-const idx and same value. -- All stores in loop eliminated. Not disambiguated (but not needed). do local t1 = { 1, 2 } local t2 = { 1, 2 } local k = 1 for i=1,100 do t1[k] = 11 assert(t1[k] == 11) t2[2] = 11 assert(t2[2] == 11) end assert(t1[1] == 11) assert(t2[2] == 11) end -- 6. Store with same ref, same value and aliased loads. -- 2nd store eliminated. Not disambiguated (but not needed). do local t1 = { 1, 2 } local t2 = t1 for i=1,100 do t1[1] = 11 assert(t2[1] == 11) t1[1] = 11 assert(t2[1] == 11) end assert(t1[1] == 11) end -- Different value ----------------------------------------------------------- -- 7. Store with same ref and different value. -- 1st store eliminated. All stores in loop eliminated. do local t = { 1, 2 } for i=1,100 do assert(true) t[1] = 11 assert(t[1] == 11) t[1] = 22 assert(t[1] == 22) end assert(t[1] == 22) end -- 8. Store with different tab, same idx and different value. -- Cannot eliminate any stores (would need dynamic disambiguation). do local t1 = { 1, 2 } local t2 = { 1, 2 } for i=1,100 do assert(true) t1[1] = 11 assert(t1[1] == 11) t2[1] = 22 assert(t2[1] == 22) end assert(t1[1] == 11) assert(t2[1] == 22) end -- 9. Store with same tab, different const idx and different value. -- Disambiguated. All stores in loop eliminated. do local t = { 1, 2 } for i=1,100 do assert(true) t[1] = 11 assert(t[1] == 11) t[2] = 22 assert(t[2] == 22) end assert(t[1] == 11) assert(t[2] == 22) end -- 10. Store with different tab, different const idx and different value. -- Disambiguated. All stores in loop eliminated. do local t1 = { 1, 2 } local t2 = { 1, 2 } for i=1,100 do assert(true) t1[1] = 11 assert(t1[1] == 11) t2[2] = 22 assert(t2[2] == 22) end assert(t1[1] == 11) assert(t2[2] == 22) end -- 11. Store with different tab, different non-const idx and different value. -- Cannot eliminate any stores (would need dynamic disambiguation). do local t1 = { 1, 2 } local t2 = { 1, 2 } local k = 1 for i=1,100 do assert(true) t1[k] = 11 assert(t1[k] == 11) t2[2] = 22 assert(t2[2] == 22) end assert(t1[1] == 11) assert(t2[2] == 22) end -- 12. Store with same ref, different value and aliased loads. -- Cannot eliminate any stores (would need dynamic disambiguation). do local t1 = { 1, 2 } local t2 = t1 for i=1,100 do assert(true) t1[1] = 11 assert(t2[1] == 11) t1[1] = 22 assert(t2[1] == 22) end assert(t1[1] == 22) end -- CALLL must inhibit DSE. do local a,b local t = {1,2} for i=1,100 do t[2]=nil a=#t t[2]=2 b=#t end assert(a == 1 and b == 2) end
-- -- TOSSAM -- author: Bruno Silvestre -- e-mail: brunoos@inf.ufg.br -- local rs232 = require("luars232") -------------------------------------------------------------------------------- local mote2baud = { eyesifx = rs232.RS232_BAUD_57600, intelmote2 = rs232.RS232_BAUD_115200, iris = rs232.RS232_BAUD_57600, mica = rs232.RS232_BAUD_19200, mica2 = rs232.RS232_BAUD_57600, mica2dot = rs232.RS232_BAUD_19200, micaz = rs232.RS232_BAUD_57600, shimmer = rs232.RS232_BAUD_115200, telos = rs232.RS232_BAUD_115200, telosb = rs232.RS232_BAUD_115200, tinynode = rs232.RS232_BAUD_115200, tmote = rs232.RS232_BAUD_115200, ucmini = rs232.RS232_BAUD_115200, } local UINT32_MAX = 4294967295 local function receive(srl) local err, data = srl.port:read(1, srl.timeout) if err == rs232.RS232_ERR_NOERROR then return data elseif err == rs232.RS232_ERR_TIMEOUT then return nil, "timeout" end return nil, rs232.error_tostring(err) end local function send(srl, data) local err if srl.timeout then err = srl.port:write(data, srl.timeout) else err = srl.port:write(data) end if err == rs232.RS232_ERR_NOERROR then return true elseif err == rs232.RS232_ERR_TIMEOUT then return false, "timeout" end return false, rs232.error_tostring(err) end local function close(srl) srl.port:close() end local function settimeout(srl, v) srl.timeout = (v >= 0) and v or UINT32_MAX end local function backend(srl) return srl.port end local meta = { __index = { receive = receive, send = send, close = close, settimeout = settimeout, backend = backend, } } local function open(portname, baud) if type(baud) == "string" then baud = mote2baud[baud] if not baud then return nil, "Invalid baud rate" end elseif type(baud) == "number" then baud = rs232["RS232_BAUD_" .. tostring(baud)] if not baud then return nil, "Invalid baud rate" end else return nil, "Invalid baud rate" end local err, port = rs232.open(portname) if err ~= rs232.RS232_ERR_NOERROR then return nil, rs232.error_tostring(err) end if port:set_baud_rate(baud) ~= rs232.RS232_ERR_NOERROR or port:set_data_bits(rs232.RS232_DATA_8) ~= rs232.RS232_ERR_NOERROR or port:set_parity(rs232.RS232_PARITY_NONE) ~= rs232.RS232_ERR_NOERROR or port:set_stop_bits(rs232.RS232_STOP_1) ~= rs232.RS232_ERR_NOERROR or port:set_flow_control(rs232.RS232_FLOW_OFF) ~= rs232.RS232_ERR_NOERROR then port:close() return nil, "Serial port setup error" end local srl = { port = port, timeout = UINT32_MAX, } return setmetatable(srl, meta) end -------------------------------------------------------------------------------- -- Module return { open = open }
object_tangible_quest_corellia_corellia_39_camera = object_tangible_quest_corellia_shared_corellia_39_camera:new { } ObjectTemplates:addTemplate(object_tangible_quest_corellia_corellia_39_camera, "object/tangible/quest/corellia/corellia_39_camera.iff")
local function rgbToHex(col) local r, g, b = bit.tohex(col.r, 2), bit.tohex(col.g, 2), bit.tohex(col.b, 2) return tostring(r .. g .. b) end hook.Add("wmChat.ChatTextAdd", "chatLink_link", function(arg) if istable(arg) and arg.link then local spanBuffer = "<span>" local styleBuffer = "" for styleName, style in pairs(arg) do if styleName == "link" then continue end if IsColor(style) then style = rgbToHex(style) end if istable(style) then continue end styleName, style = chat.RemoveHTMLTags(styleName), chat.RemoveHTMLTags(style) styleBuffer = styleBuffer .. styleName .. ": " .. tostring(style) .. ";" end local argumentBuffer = {} for _, argument in ipairs(arg.link["arguments"]) do if type(argument) == "string" then argument = "\\\"" .. argument .. "\\\"" end table.insert(argumentBuffer, argument) end spanBuffer = spanBuffer .. "<a href=\"javascript:void(0)\" onclick='console.log(\"RUNLUA:" .. string.JavascriptSafe(chat.RemoveHTMLTags(arg.link["functionName"])) .. "("..table.concat(argumentBuffer, ", ")..")\")', " .. "style=\""..styleBuffer.."\">"..chat.RemoveHTMLTags(arg.link["text"]).."</a></span>" return true, spanBuffer, arg.link["text"] -- Prevent default behaviour. Adds custom HTML arguments to the buffer instead end end)
--[[ The MIT License (MIT) Copyright (c) 2015 Loïc Fejoz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] -- Gabriel's Horn is defined as the implicit surface of revolution of equation r = c / p.z; and r the length in the plane (x,y). function horn(c) local c2 = 2 * c local glsl = [[ uniform float c; float inTrompette(vec3 p) { vec3 p2 = p * p; return (p2.x + p2.y) * p2.z - (c * c); } float distanceEstimator(vec3 p) { float p_radius = length(p.xy); vec2 cp = vec2(p.z, p_radius); vec2 cq = vec2(p.z, c / p.z); if (p.z >= 1.0) { // Search min distance by dichotomy between projection of p on surface along z axis and point (1.0, c) vec2 cq_right = cq; vec2 cq_left = vec2(1.0, c); vec2 cq_middle; float dist_right = length(cp - cq_right); float dist_left = length(cp - cq_left); float dist = min(dist_left, dist_right); float dist_middle; bool oneMoreStep; do { oneMoreStep = false; cq_middle.x = (cq_right.x + cq_left.x) / 2.0; cq_middle.y = c / cq_middle.x; dist_middle = length(cp - cq_middle); if (dist_middle < dist) { oneMoreStep = (dist - dist_middle) > (minDistanceSphereTracing / 2.0); dist = dist_middle; if (dist_middle < dist_left) { cq_left = cq_middle; } else { cq_right = cq_middle; } } } while(oneMoreStep); if (p_radius < c / p.z) { return -0.1 * dist; } return 0.1 * dist; } else { if (p_radius < c) { return 0.1 * abs(p.z - 1); } else { cq = vec2(1.0, c); return 0.1 * length(cp - cq); } } } ]] print(glsl) trompette_sphere = implicit(v(-c2,-c2, 0), v(c2,c2,c2), glsl) set_uniform_scalar(trompette_sphere, "c", c) return trompette_sphere end --emit(horn(5.0)) --emit(scale(1) * horn(5.0)) emit(scale(2) * horn(5.0))
local colors = require("yanil.colors") local git = require("yanil.git") local M = {} function M.setup(opts) opts = opts or {} colors.setup() git.setup(opts.git) end return M
local w3xparser = require 'w3xparser' local table_concat = table.concat local ipairs = ipairs local string_char = string.char local pairs = pairs local table_sort = table.sort local table_insert = table.insert local math_floor = math.floor local wtonumber = w3xparser.tonumber local select = select local table_unpack = table.unpack local os_clock = os.clock local type = type local next = next local report local w2l local metadata local keys local remove_unuse_object local object local function to_type(tp, value) if tp == 0 then if not value or value == 0 then return nil end return value elseif tp == 1 or tp == 2 then if not value or value == 0 then return nil end return ('%.4f'):format(value):gsub('[0]+$', ''):gsub('%.$', '') elseif tp == 3 then if not value then return end if value:find(',', nil, false) then value = '"' .. value .. '"' end return value end end local function get_index_data(tp, l, n) local null for i = n, 1, -1 do local v = to_type(tp, l[i]) if v and v ~= '' then l[i] = v null = '' else l[i] = null end end if #l == 0 then return end if tp == 3 then for i = #l, 2, -1 do if l[i] == l[i-1] then l[i] = nil else break end end end return table_concat(l, ',') end local function add_data(obj, meta, value, keyval) local key = meta.field if meta.index then -- TODO: 有点奇怪的写法 if meta.index == 1 then local value = get_index_data(meta.type, {obj[meta.key..'_1'], obj[meta.key..'_2']}, 2) if not value then if meta.cantempty then value = ',' else return end end keyval[#keyval+1] = {key:sub(1,-3), value} end return end if meta.appendindex then if type(value) == 'table' then local len = 0 for n in pairs(value) do if n > len then len = n end end if len == 0 then return end if len > 1 then keyval[#keyval+1] = {key..'count', len} end local flag for i = 1, len do local key = key if i > 1 then key = key .. (i-1) end if value[i] and value[i] ~= '' then flag = true if meta.concat then keyval[#keyval+1] = {key, value[i]} else keyval[#keyval+1] = {key, to_type(meta.type, value[i])} end end end if not flag and len > 1 then keyval[#keyval] = nil end else if not value then return end if meta.concat then keyval[#keyval+1] = {key, value} else keyval[#keyval+1] = {key, to_type(meta.type, value)} end end return end if meta.concat then if value and value ~= 0 then keyval[#keyval+1] = {key, value} end return end if type(value) == 'table' then if #value == 0 then return end value = get_index_data(meta.type, value, #value) else value = to_type(meta.type, value) end if not value or value == '' then if meta.cantempty then value = ',' else return end end if value then keyval[#keyval+1] = {key, value} end end local function create_keyval(obj) local keyval = {} for _, key in ipairs(keys) do if key ~= 'editorsuffix' and key ~= 'editorname' then add_data(obj, metadata[key], obj[key], keyval) end end return keyval end local function stringify_obj(str, obj) local keyval = create_keyval(obj) if #keyval == 0 then return end table_sort(keyval, function(a, b) return a[1]:lower() < b[1]:lower() end) local empty = true str[#str+1] = ('[%s]'):format(obj._slk_id or obj._id) for _, kv in ipairs(keyval) do local key, val = kv[1], kv[2] if val ~= '' then if type(val) == 'string' then val = val:gsub('\r\n', '|n'):gsub('[\r\n]', '|n') end str[#str+1] = key .. '=' .. val empty = false end end if empty then str[#str] = nil else str[#str+1] = '' end end local displaytype = { unit = '单位', ability = '技能', item = '物品', buff = '魔法效果', upgrade = '科技', doodad = '装饰物', destructable = '可破坏物', } local function get_displayname(o) local name if o._type == 'buff' then name = o.bufftip or o.editorname or '' elseif o._type == 'upgrade' then name = o.name[1] or '' else name = o.name or '' end return displaytype[o._type], o._id, (name:sub(1, 100):gsub('\r\n', ' ')) end local function report_failed(obj, key, tip, info) report.n = report.n + 1 if not report[tip] then report[tip] = {} end if report[tip][obj._id] then return end local type, id, name = get_displayname(obj) report[tip][obj._id] = { ("%s %s %s"):format(type, id, name), ("%s %s"):format(key, info), } end local function check_string(s) return type(s) == 'string' and s:find(',', nil, false) and s:find('"', nil, false) end local function prebuild_data(obj, key, r) if not obj[key] then return end local name = obj._id if type(obj[key]) == 'table' then object[name][key] = {} local t = {} for k, v in pairs(obj[key]) do if check_string(v) then report_failed(obj, metadata[key].field, '文本内容同时包含了逗号和双引号', v) object[name][key][k] = v else t[k] = v end end if not next(object[name][key]) then object[name][key] = nil end r[key] = t else if check_string(obj[key]) then report_failed(obj, metadata[key].field, '文本内容同时包含了逗号和双引号', obj[key]) object[name][key] = obj[key] else r[key] = obj[key] end end end local function prebuild_obj(name, obj) if remove_unuse_object and not obj._mark then return end local r = {} for _, key in ipairs(keys) do prebuild_data(obj, key, r) end if next(r) then r._id = obj._id r._slk_id = obj._slk_id return r end end local function prebuild_merge(obj, a, b) -- TODO: 需要处理a和b类型不一样的情况 if a._type ~= b._type then local tp1, _, name1 = get_displayname(a) local tp2, _, name2 = get_displayname(b) w2l.message('-report|2警告', ('对象的ID冲突[%s]'):format(obj._id)) w2l.message('-tip', ('[%s]%s --> [%s]%s'):format(tp1, name1, tp2, name2)) end for k, v in pairs(b) do if k == '_id' or k == '_type' then goto CONTINUE end if type(v) == 'table' then if type(a[k]) == 'table' then for i, iv in pairs(v) do if a[k][i] ~= iv then report_failed(obj, metadata[k].field, '文本内容和另一个对象冲突', '--> ' .. a._id) if obj[k] then obj[k][i] = iv else obj[k] = {[i] = iv} end end end else report_failed(obj, metadata[k].field, '文本内容和另一个对象冲突', '--> ' .. a._id) for i, iv in pairs(v) do if obj[k] then obj[k][i] = iv else obj[k] = {[i] = iv} end end end else if a[k] ~= v then report_failed(obj, metadata[k].field, '文本内容和另一个对象冲突', '--> ' .. a._id) obj[k] = v end end ::CONTINUE:: end end local function prebuild(type, input, output, list) for name, obj in pairs(input) do local r = prebuild_obj(name, obj) if r then r._type = type name = name:lower() if output[name] then prebuild_merge(obj, output[name], r) else output[name] = r list[#list+1] = r._id end end end end local function update_constant(type) metadata = w2l:metadata()[type] keys = w2l:keydata()[type] end return function(w2l_, slk, report_, obj) w2l = w2l_ report = report_ remove_unuse_object = w2l.config.remove_unuse_object local txt = {} local list = {} for _, type in ipairs {'ability', 'buff', 'unit', 'item', 'upgrade'} do list[type] = {} object = obj[type] update_constant(type) if slk[type] then prebuild(type, slk[type], txt, list[type]) end end local r = {} for _, type in ipairs {'ability', 'buff', 'unit', 'item', 'upgrade'} do update_constant(type) local str = {} table_sort(list[type]) for _, name in ipairs(list[type]) do stringify_obj(str, txt[name:lower()]) end r[type] = table_concat(str, '\r\n') end return r end
local debug = require('debug') local function sourcefile(level) local info = debug.getinfo(level or 2, 'S') local source = info and info.source return source and source:startswith('@') and source:sub(2) or nil end local function sourcedir(level) local source = sourcefile(level and level + 1 or 3) return source and source:match('(.*)/') or '.' end setmetatable(debug, { __index = function(self, v) -- Be careful editing these tail calls, -- since it may affect function results if v == '__file__' then return sourcefile() elseif v == '__dir__' then return sourcedir() end return rawget(self, v) end }) debug.sourcefile = sourcefile debug.sourcedir = sourcedir
local M = {} -- -- deep copy for tables -- function M.deepCopy(t) if type(t) ~= 'table' then return t end local mt = getmetatable(t) local res = {} for k,v in pairs(t) do if type(v) == 'table' then v = M.deep_copy(v) end res[k] = v end setmetatable(res,mt) return res end return M
while true do repeat wait() until script.Parent.Parent.Parent.Owner.Value while script.Parent.Parent.Parent.Owner.Value do wait(1) if script.Parent.Employee.Head.Transparency < 1 then script.Parent.Parent.Parent.Owner.Value.leaderstats.Cash.Value = script.Parent.Parent.Parent.Owner.Value.leaderstats.Cash.Value + script.Parent.Parent.Parent.EmployeeIncomeAmount.Value end end end
--[[ More Blocks: stair definitions Copyright (c) 2011-2017 Hugo Locurcio and contributors. Licensed under the zlib license. See LICENSE.md for more information. --]] local S = moreblocks.intllib -- Node will be called <modname>:stair_<subname> function register_stair(modname, subname, recipeitem, groups, images, description, drop, light) stairsplus:register_stair(modname, subname, recipeitem, { groups = groups, tiles = images, description = description, drop = drop, light_source = light, sounds = default.node_sound_stone_defaults(), }) end local stairs_defs = { [""] = { node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.5, 0.5}, }, }, }, ["_half"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0, 0, 0.5}, {-0.5, 0, 0, 0, 0.5, 0.5}, }, }, }, ["_right_half" ]= { node_box = { type = "fixed", fixed = { {0, -0.5, -0.5, 0.5, 0, 0.5}, {0, 0, 0, 0.5, 0.5, 0.5}, }, }, }, ["_inner"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.5, 0.5}, {-0.5, 0, -0.5, 0, 0.5, 0}, }, }, }, ["_outer"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0, 0.5, 0.5}, }, }, }, ["_alt"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0}, {-0.5, 0, 0, 0.5, 0.5, 0.5}, }, }, }, ["_alt_1"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.0625, -0.5, 0.5, 0, 0}, {-0.5, 0.4375, 0, 0.5, 0.5, 0.5}, }, }, }, ["_alt_2"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.125, -0.5, 0.5, 0, 0}, {-0.5, 0.375, 0, 0.5, 0.5, 0.5}, }, }, }, ["_alt_4"] = { node_box = { type = "fixed", fixed = { {-0.5, -0.25, -0.5, 0.5, 0, 0}, {-0.5, 0.25, 0, 0.5, 0.5, 0.5}, }, }, }, } for k,v in pairs(stairs_defs) do table.insert(stairsplus.shapes_list, { "stair_", k }) end function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new) local defs = stairsplus.copytable(stairs_defs) for alternate, def in pairs(defs) do minetest.register_alias(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate) end end function stairsplus:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new) local defs = stairsplus.copytable(stairs_defs) for alternate, def in pairs(defs) do minetest.register_alias_force(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate) end end function stairsplus:register_stair(modname, subname, recipeitem, fields) local defs = stairsplus.copytable(stairs_defs) local desc = S("%s Stairs"):format(fields.description) for alternate, def in pairs(defs) do for k, v in pairs(fields) do def[k] = v end def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = def.paramtype2 or "facedir" def.on_place = minetest.rotate_node def.description = desc def.groups = stairsplus:prepare_groups(fields.groups) if fields.drop and not (type(fields.drop) == "table") then def.drop = modname .. ":stair_" .. fields.drop .. alternate end minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def) end minetest.register_alias("stairs:stair_" .. subname, modname .. ":stair_" .. subname) circular_saw.known_nodes[recipeitem] = {modname, subname} -- Some saw-less recipes: minetest.register_craft({ output = modname .. ":stair_" .. subname .. " 8", recipe = { {recipeitem, "", ""}, {recipeitem, recipeitem, ""}, {recipeitem, recipeitem, recipeitem}, }, }) minetest.register_craft({ output = modname .. ":stair_" .. subname .. " 8", recipe = { {"", "", recipeitem}, {"", recipeitem, recipeitem}, {recipeitem, recipeitem, recipeitem}, }, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname, recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname, recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname .. "_outer", recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname .. "_half", recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname .. "_half", recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname .. "_right_half", recipe = {modname .. ":stair_" .. subname .. "_half"}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname, recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname .. "_inner", recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname .. "_outer", recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname}, }) minetest.register_craft({ type = "shapeless", output = modname .. ":stair_" .. subname, recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}, }) minetest.register_craft({ -- See mirrored variation of the recipe below. output = modname .. ":stair_" .. subname .. "_alt", recipe = { {modname .. ":panel_" .. subname, ""}, {"" , modname .. ":panel_" .. subname}, }, }) minetest.register_craft({ -- Mirrored variation of the recipe above. output = modname .. ":stair_" .. subname .. "_alt", recipe = { {"" , modname .. ":panel_" .. subname}, {modname .. ":panel_" .. subname, ""}, }, }) end
if not minetest.get_modpath("technic") then print("[monitoring] technic extension not loaded") return else print("[monitoring] technic extension loaded") end for _, abm in ipairs(minetest.registered_abms) do if abm.label == "Switching Station" then print("[monitoring] wrapping switching station abm") abm.action = monitoring .counter("technic_switching_station_abm_count", "number of technic switch abm calls") .wrap(abm.action) abm.action = monitoring .histogram("technic_switching_station_abm_latency", "latency of the technic switch abm calls", {0.001, 0.005, 0.01, 0.02, 0.1, 0.5, 1.0}) .wrap(abm.action) end if abm.label == "Machines: timeout check" then print("[monitoring] wrapping technic machine timeout check") abm.action = monitoring .counter("technic_machine_timeout_abm_count", "number of technic machine timeout abm calls") .wrap(abm.action) abm.action = monitoring .histogram("technic_machine_timeout_abm_latency", "latency of the technic machine timeout abm calls", {0.001, 0.005, 0.01, 0.02, 0.1, 0.5, 1.0}) .wrap(abm.action) end end if minetest.get_modpath("technic") then local quarry_node = minetest.registered_nodes["technic:quarry"] if quarry_node ~= nil then print("[monitoring] wrapping quarry.technic_run") quarry_node.technic_run = monitoring .counter("technic_quarry_dig_count", "number of technic quarry digs") .wrap(quarry_node.technic_run) end print("[monitoring] wrapping technic.get_or_load_node") technic.get_or_load_node = monitoring .histogram("technic_get_or_load_node_latency", "latency of the technic get_or_load_node calls", {0.001, 0.005, 0.01, 0.02, 0.1, 0.5, 1.0}) .wrap(technic.get_or_load_node) end
return { categories = { ["yrcat-farm"] = 1/30, ["yrcat-fish"] = 1/30, ["yrcat_meat"] = 0.01, }, recipes = { } }
--[[ Made by Megumu/Mommy Mango <3 ]] --Egg _G.Egg = "Volcano" local t=string.byte;local r=string.char;local c=string.sub;local F=table.concat;local h=math.ldexp;local N=getfenv or function()return _ENV end;local K=setmetatable;local s=select;local f=unpack;local i=tonumber;local function B(f)local e,o,n="","",{}local d=256;local a={}for l=0,d-1 do a[l]=r(l)end;local l=1;local function t()local e=i(c(f,l,l),36)l=l+1;local o=i(c(f,l,l+e-1),36)l=l+e;return o end;e=r(t())n[1]=e;while l<#f do local l=t()if a[l]then o=a[l]else o=e..c(e,1,1)end;a[d]=e..c(o,1,1)n[#n+1],e,d=o,o,d+1 end;return table.concat(n)end;local a=B('24324124327624227627623V27925624B22R23021D24B27625424Z27621127L1J25923V27F1S27B1J27D27F27H2762532791H27925723N23N2431V28624325926J27S26J24327V23N27X28925724B27L21K27I24325425727M28R27P24Z27S27O25628H27G28928027628227624Y27R2301427B24325723V2861V29A25924J27S24J28F28R2761B28324B25V2431M28O24Y25727F1V29M29C29E29A25629I2301V29K29B24B29E28O25927F2301S27F26K25B28O21728O24527924223M27926T26Y26926U26O27326Y26O26W26V26U26F2AU26F27026924224D2792AV2AX26W25O2B02B226O2B42692792BJ22R24S2422472792602BB24228924325C25P25N24Z25124Z25F2692702B424Z26426526725M2BN27926C26Q26Y26F27527923Q27925227E2301T28O25323N27L28827Z23N29K2CS24324U28V2A527L24324R24329R1V27924M2A42A62762A728727924E24R29X2D324324N24J1J2872A724R25726R28729M24R25V29E29R24324M25F29X25F2762DK132DN2E324J1Z2E62D22632DR1V2632762DZ2E12E722B2EA2DK21V2EA24R26R2ED2DR24325324Z29E2D12AI2761V28O24E2AN2BO27626S26Q27226U24224927925C26F26Q2692B226925W26E26Y2422442FC2B125S2B52F92CI27625S26Z26Q26F26626Q26W26U25C26I2682B227226626U26826826Q26S2F92F424325J26U26J26F2FA27925K25C25S25D26225F25J25Q24P24Z2782AN2462792FQ2732B52CA27625X2702712GK2GF25Y27126E2722GL27625C27026E26926O2G226Q27126824228O2432H62H825C26Y26H2F92AM2HG2HW26U24N24H1G27925A2CL21B28O25B2432CR2CJ29729F27625B23V2CR29A2IB2D527C2CL2F027628K2CR29U29W2A529Z2IJ28729A2522D92A724Y2CL27Y2IC23V26B24321Q29A24Q25V29X2DX24N28O2IQ2IC2D11V2D12802ID27Z2A928728O25022Z23W24321J22Z2302AH2792E529526327F21E2EF24324V24B21F2JS27624V24Z2E92JM2KE2892CW27L2IN27625923N22Q2A523N2421J24F24R2EK1U2DI24626Z27F1426Z27624F2IY21R29A24C22R27M2LC27P23F27S23F28F2KW2372432KZ27624628C29828E2432L727L2L927624C22J27M2LZ27P22B27S2EK2KV24R2LL2LN2432461J2L32DM2LT2L82LA2KC2432112KC27P1B27S29O1J24E1R27X1R27624A1327F1F2K324F28528728924E2MN2A529O24324A21F29X2MI24724R25F2421V2DI24B2632KC2EE2L62N22CW2N529X2N824A1Z29X2E92432NE2432NH2DI24725F26B2421A2E22432NK2KC21I2K82N129E2N42N61V2NT2M32A52EK2NY2DG2872O22O42NH2O82OA2872OD2NP28927L27L21227925921V2312AE2P426K2J427F21C28O24U2K52302K727624R2KB2KD2D22572KH2DT2KK28924V2D42DD2KO21V2KR1V21V2KU29Q2M82DX24222J2L32LZ2O92MG2762481Z2782112QB27P21N2KR1S21N2PZ25V2KY2Q22L22982L52Q72LV29A2481R2QC2QV27P1J2QH1J2KU24A21V27X2EN2O92632QB192K824725V2NG1V2Q223729X2LL27625N2PY1V25N27624B2IY2IG24324822Z2EZ2RV27P22R27S2LE2RQ29329A2462RZ230182LC2O022Z29X2RV2RK2742RN27623Y24B2PW24B27823U2KQ2KS27823Q2SJ2A52SL2762JL2D127I29E27927I24J2412D62RP26325V2T32RB25V26R2411U2DX23Y24R2KR21L24R2782472RR29A2O325F2T32OT25721E2DS27824A25V2PW25V27824B2JR2JJ2JR2N32762RC132NH2DX2A92OF2MV2TX2A52TZ2O92JR1128O2T12412182T02T62T82U624B132T328O2O321F2TQ2U625F2TP1V2TR2TT29Y27825926R29X2DR27P2PE1S2EF1J2S22431H2S425N2KR1225N2782422SB2A52SD2432RO2T32RO24323Y2SO2882SM2SS2F02SQ2W22SU2IC2EZ2SX2432SZ2KO2IP27I1J2PR2P02P223N2P51S2WJ2AH2AJ28O2542F32792F62F82HF24325W2B125C26U26926D2AX2F92FN27625F27326Q26I2X02HP24827926727026O26Q2732X72X92X024224A27925G2B526W26826B26Q2HL2WV2H226Q26V2G526926Y27126S2FM27926326F26F26B2WX2GK24Y27926Z2Y926B26824P2582582XU2G526U26P2Y325926O27027225826926Q26C25826D26126S24L25C26Q24R26C2422HZ24326Y2XU2AS2HP2HA26S26S2XC2792YC2FV26Y27326V2AT27124224027926226825U2422GZ2762662702B02732B727925X2Y326V31072692G52ZM2ZO2Z927925D2FF2CE26I2H42GG26I26B2GE2CB2FF2ZR2ZZ24325A310V310V2ZY27926B2Y22H8310F2762652F726U2GV310L31152WU2ZA25J310N31172GW310T25H2XI26E2F92HR310H2Y226F26I31182F22FU2AW2AY25Z2B12B32H32ZA2Y12Y32Y52GF2AR27126V2422CG24325O25W2ZS27925Y2ZH2WV312F26S24Z26T2HI312624Y31132432H12B524G312D27627126U26C2BJ312Z31302432BL2XN2H02FW2YX2BG2XM2BT2632HD2HN27026Y26V25D2702C325F2FF2GK2ZA25S25X2YX2WU2FT2HS3108310A310C26Z2ZN26V26426T25S2X82GA2HQ2792G826826Z313K2FG310L2CC2CE2422XD2762GH27326U26B2B526F313K31272BT25S26U2H82YX27324Z314I314K314M242311S24326527024Z271311624Z2722FX26O26Z');local n=bit and bit.bxor or function(l,o)local e,n=1,0 while l>0 and o>0 do local c,a=l%2,o%2 if c~=a then n=n+e end l,o,e=(l-c)/2,(o-a)/2,e*2 end if l<o then l=o end while l>0 do local o=l%2 if o>0 then n=n+e end l,e=(l-o)/2,e*2 end return n end local function e(o,l,e)if e then local l=(o/2^(l-1))%2^((e-1)-(l-1)+1);return l-l%1;else local l=2^(l-1);return(o%(l+l)>=l)and 1 or 0;end;end;local l=1;local function o()local e,c,o,a=t(a,l,l+3);e=n(e,147)c=n(c,147)o=n(o,147)a=n(a,147)l=l+4;return(a*16777216)+(o*65536)+(c*256)+e;end;local function d()local e=n(t(a,l,l),147);l=l+1;return e;end;local function B()local l=o();local n=o();local c=1;local o=(e(n,1,20)*(2^32))+l;local l=e(n,21,31);local e=((-1)^e(n,32));if(l==0)then if(o==0)then return e*0;else l=1;c=0;end;elseif(l==2047)then return(o==0)and(e*(1/0))or(e*(0/0));end;return h(e,l-1023)*(c+(o/(2^52)));end;local i=o;local function h(e)local o;if(not e)then e=i();if(e==0)then return'';end;end;o=c(a,l,l+e-1);l=l+e;local e={}for l=1,#o do e[l]=r(n(t(c(o,l,l)),147))end return F(e);end;local l=o;local function r(...)return{...},s('#',...)end local function C()local f={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};local l={0,0};local c={};local a={f,nil,l,nil,c};a[4]=d();for e=1,o()do l[e-1]=C();end;for a=1,o()do local c=n(o(),44);local o=n(o(),140);local n=e(c,1,2);local l=e(o,1,11);local l={l,e(c,3,11),nil,nil,o};if(n==0)then l[3]=e(c,12,20);l[5]=e(c,21,29);elseif(n==1)then l[3]=e(o,12,33);elseif(n==2)then l[3]=e(o,12,32)-1048575;elseif(n==3)then l[3]=e(o,12,32)-1048575;l[5]=e(c,21,29);end;f[a]=l;end;local l=o()local o={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};for n=1,l do local e=d();local l;if(e==2)then l=(d()~=0);elseif(e==0)then l=B();elseif(e==1)then l=h();end;o[n]=l;end;a[2]=o return a;end;local function B(l,Z,t)local o=l[1];local e=l[2];local a=l[3];local l=l[4];return function(...)local n=o;local c=e;local V=a;local a=l;local h=r local e=1;local d=-1;local F={};local r={...};local i=s('#',...)-1;local R={};local o={};for l=0,i do if(l>=a)then F[l-a]=r[l+1];else o[l]=r[l+1];end;end;local l=i-a+1 local l;local a;while true do l=n[e];a=l[1];if a<=28 then if a<=13 then if a<=6 then if a<=2 then if a<=0 then local e=l[2];local c={};local n=0;local l=e+l[3]-1;for l=e+1,l do n=n+1;c[n]=o[l];end;o[e](f(c,1,l-e));d=e;elseif a==1 then local n=l[2];local e=o[l[3]];o[n+1]=e;o[n]=e[c[l[5]]];else local F;local h;local s;local i;local r;local a;o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];a=l[2];r=o[l[3]];o[a+1]=r;o[a]=r[c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]={};e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=o[l[3]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];r=l[3];i=o[r]for l=r+1,l[5]do i=i..o[l];end;o[l[2]]=i;e=e+1;l=n[e];o[l[2]][c[l[3]]]=o[l[5]];e=e+1;l=n[e];o[l[2]][c[l[3]]]=o[l[5]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]][c[l[3]]]=o[l[5]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]][c[l[3]]]=o[l[5]];e=e+1;l=n[e];a=l[2];s={};h=0;F=a+l[3]-1;for l=a+1,F do h=h+1;s[h]=o[l];end;o[a](f(s,1,F-a));d=a;e=e+1;l=n[e];do return end;end;elseif a<=4 then if a>3 then o[l[2]]=(l[3]~=0);else e=e+l[3];end;elseif a==5 then e=e+l[3];else o[l[2]]=Z[l[3]];end;elseif a<=9 then if a<=7 then do return end;elseif a==8 then local n=l[2];local c={};local e=0;local a=d;for l=n+1,a do e=e+1;c[e]=o[l];end;local c={o[n](f(c,1,a-n))};local l=n+l[5]-2;e=0;for l=n,l do e=e+1;o[l]=c[e];end;d=l;else local i;local r;local s;local h;local a;a=l[2];h=o[l[3]];o[a+1]=h;o[a]=h[c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];s={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;s[r]=o[l];end;o[a](f(s,1,i-a));d=a;e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]();d=a;end;elseif a<=11 then if a>10 then o[l[2]]=t[c[l[3]]];else o[l[2]]();d=A;end;elseif a>12 then local n=l[2];local c={};local e=0;local a=d;for l=n+1,a do e=e+1;c[e]=o[l];end;local c={o[n](f(c,1,a-n))};local l=n+l[5]-2;e=0;for l=n,l do e=e+1;o[l]=c[e];end;d=l;else local n=l[2];local e=o[l[3]];o[n+1]=e;o[n]=e[c[l[5]]];end;elseif a<=20 then if a<=16 then if a<=14 then o[l[2]]=o[l[3]];elseif a>15 then local s;local F;local i;local r;local h;local a;o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];h={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;h[r]=o[l];end;o[a](f(h,1,i-a));d=a;e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];F=l[3];s=o[F]for l=F+1,l[5]do s=s..o[l];end;o[l[2]]=s;e=e+1;l=n[e];a=l[2];h={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;h[r]=o[l];end;o[a](f(h,1,i-a));d=a;e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];else o[l[2]]=o[l[3]][c[l[5]]];end;elseif a<=18 then if a==17 then local n=l[3];local e=o[n]for l=n+1,l[5]do e=e..o[l];end;o[l[2]]=e;else local n=l[3];local e=o[n]for l=n+1,l[5]do e=e..o[l];end;o[l[2]]=e;end;elseif a>19 then o[l[2]]=Z[l[3]];else local a;local F,a;local i;local r;local s;local B;local a;o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];a=l[2];B=o[l[3]];o[a+1]=B;o[a]=B[c[l[5]]];e=e+1;l=n[e];a=l[2];s={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;s[r]=o[l];end;F,i=h(o[a](f(s,1,i-a)));i=i+a-1;r=0;for l=a,i do r=r+1;o[l]=F[r];end;d=i;e=e+1;l=n[e];a=l[2];s={};r=0;i=d;for l=a+1,i do r=r+1;s[r]=o[l];end;F={o[a](f(s,1,i-a))};i=a+l[5]-2;r=0;for l=a,i do r=r+1;o[l]=F[r];end;d=i;e=e+1;l=n[e];e=e+l[3];end;elseif a<=24 then if a<=22 then if a>21 then local s;local i;local a;local h;local r;o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];r=l[2];h={};a=0;i=r+l[3]-1;for l=r+1,i do a=a+1;h[a]=o[l];end;s={o[r](f(h,1,i-r))};i=r+l[5]-2;a=0;for l=r,i do a=a+1;o[l]=s[a];end;d=i;e=e+1;l=n[e];if o[l[2]]then e=e+1;else e=e+l[3];end;else o[l[2]]=o[l[3]][c[l[5]]];end;elseif a==23 then local F,a;local i;local r;local s;local a;o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];s={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;s[r]=o[l];end;F,i=h(o[a](f(s,1,i-a)));i=i+a-1;r=0;for l=a,i do r=r+1;o[l]=F[r];end;d=i;e=e+1;l=n[e];a=l[2];s={};r=0;i=d;for l=a+1,i do r=r+1;s[r]=o[l];end;o[a](f(s,1,i-a));d=a;e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];else local n=l[2];local a={};local e=0;local c=n+l[3]-1;for l=n+1,c do e=e+1;a[e]=o[l];end;local c={o[n](f(a,1,c-n))};local l=n+l[5]-2;e=0;for l=n,l do e=e+1;o[l]=c[e];end;d=l;end;elseif a<=26 then if a>25 then local n=l[2];local c={};local e=0;local l=n+l[3]-1;for l=n+1,l do e=e+1;c[e]=o[l];end;local c,l=h(o[n](f(c,1,l-n)));l=l+n-1;e=0;for l=n,l do e=e+1;o[l]=c[e];end;d=l;else o[l[2]][c[l[3]]]=o[l[5]];end;elseif a>27 then o[l[2]]=o[l[3]];else o[l[2]]=c[l[3]];end;elseif a<=43 then if a<=35 then if a<=31 then if a<=29 then local F,a;local i;local r;local s;local a;o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];s={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;s[r]=o[l];end;F,i=h(o[a](f(s,1,i-a)));i=i+a-1;r=0;for l=a,i do r=r+1;o[l]=F[r];end;d=i;e=e+1;l=n[e];a=l[2];s={};r=0;i=d;for l=a+1,i do r=r+1;s[r]=o[l];end;o[a](f(s,1,i-a));d=a;e=e+1;l=n[e];e=e+l[3];elseif a==30 then o[l[2]]();d=A;else o[l[2]]={};end;elseif a<=33 then if a>32 then local a;local s,a;local r;local t;local i;local F;local a;a=l[2];F=o[l[3]];o[a+1]=F;o[a]=F[c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=(l[3]~=0);e=e+1;l=n[e];a=l[2];i={};t=0;r=a+l[3]-1;for l=a+1,r do t=t+1;i[t]=o[l];end;s,r=h(o[a](f(i,1,r-a)));r=r+a-1;t=0;for l=a,r do t=t+1;o[l]=s[t];end;d=r;e=e+1;l=n[e];a=l[2];i={};t=0;r=d;for l=a+1,r do t=t+1;i[t]=o[l];end;s={o[a](f(i,1,r-a))};r=a+l[5]-2;t=0;for l=a,r do t=t+1;o[l]=s[t];end;d=r;e=e+1;l=n[e];o[l[2]]();d=a;else local n=l[2];local c={};local e=0;local a=n+l[3]-1;for l=n+1,a do e=e+1;c[e]=o[l];end;local c={o[n](f(c,1,a-n))};local l=n+l[5]-2;e=0;for l=n,l do e=e+1;o[l]=c[e];end;d=l;end;elseif a>34 then o[l[2]]=B(V[l[3]],nil,t);else local e=l[2];local c,n={o[e]()};local n=e+l[5]-2;local l=0;for e=e,n do l=l+1;o[e]=c[l];end;d=n;end;elseif a<=39 then if a<=37 then if a==36 then o[l[2]]={};else local f=V[l[3]];local d;local c={};d=K({},{__index=function(e,l)local l=c[l];return l[1][l[2]];end,__newindex=function(o,l,e)local l=c[l]l[1][l[2]]=e;end;});for a=1,l[5]do e=e+1;local l=n[e];if l[1]==28 then c[a-1]={o,l[3]};else c[a-1]={Z,l[3]};end;R[#R+1]=c;end;o[l[2]]=B(f,d,t);end;elseif a>38 then local e=l[2];local c,n={o[e]()};local n=e+l[5]-2;local l=0;for e=e,n do l=l+1;o[e]=c[l];end;d=n;else local s;local i;local r;local h;local a;o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];h={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;h[r]=o[l];end;s={o[a](f(h,1,i-a))};i=a+l[5]-2;r=0;for l=a,i do r=r+1;o[l]=s[r];end;d=i;e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]][c[l[3]]]=o[l[5]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]();d=a;e=e+1;l=n[e];o[l[2]]=o[l[3]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];a=l[2];h={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;h[r]=o[l];end;o[a](f(h,1,i-a));d=a;e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];end;elseif a<=41 then if a>40 then local F;local r;local h;local a;local i;local s;s=l[3];i=o[s]for l=s+1,l[5]do i=i..o[l];end;o[l[2]]=i;e=e+1;l=n[e];a=l[2];h={};r=0;F=a+l[3]-1;for l=a+1,F do r=r+1;h[r]=o[l];end;o[a](f(h,1,F-a));d=a;e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];s=l[3];i=o[s]for l=s+1,l[5]do i=i..o[l];end;o[l[2]]=i;e=e+1;l=n[e];a=l[2];h={};r=0;F=a+l[3]-1;for l=a+1,F do r=r+1;h[r]=o[l];end;o[a](f(h,1,F-a));d=a;else local d=V[l[3]];local a;local c={};a=K({},{__index=function(e,l)local l=c[l];return l[1][l[2]];end,__newindex=function(o,l,e)local l=c[l]l[1][l[2]]=e;end;});for a=1,l[5]do e=e+1;local l=n[e];if l[1]==28 then c[a-1]={o,l[3]};else c[a-1]={Z,l[3]};end;R[#R+1]=c;end;o[l[2]]=B(d,a,t);end;elseif a>42 then local l=l[2];local c={};local e=0;local n=d;for l=l+1,n do e=e+1;c[e]=o[l];end;o[l](f(c,1,n-l));d=l;else o[l[2]]=c[l[3]];end;elseif a<=50 then if a<=46 then if a<=44 then o[l[2]][c[l[3]]]=o[l[5]];elseif a>45 then o[l[2]]=t[c[l[3]]];else local a;local F,a;local i;local a;local s;local B;local r;o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];r=l[2];B=o[l[3]];o[r+1]=B;o[r]=B[c[l[5]]];e=e+1;l=n[e];r=l[2];s={};a=0;i=r+l[3]-1;for l=r+1,i do a=a+1;s[a]=o[l];end;F,i=h(o[r](f(s,1,i-r)));i=i+r-1;a=0;for l=r,i do a=a+1;o[l]=F[a];end;d=i;e=e+1;l=n[e];r=l[2];s={};a=0;i=d;for l=r+1,i do a=a+1;s[a]=o[l];end;F={o[r](f(s,1,i-r))};i=r+l[5]-2;a=0;for l=r,i do a=a+1;o[l]=F[a];end;d=i;e=e+1;l=n[e];e=e+l[3];end;elseif a<=48 then if a>47 then local F;local i;local r;local s;local h;local a;o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];a=l[2];h=o[l[3]];o[a+1]=h;o[a]=h[c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];s={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;s[r]=o[l];end;F={o[a](f(s,1,i-a))};i=a+l[5]-2;r=0;for l=a,i do r=r+1;o[l]=F[r];end;d=i;e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];e=e+1;l=n[e];a=l[2];h=o[l[3]];o[a+1]=h;o[a]=h[c[l[5]]];e=e+1;l=n[e];o[l[2]]=c[l[3]];e=e+1;l=n[e];a=l[2];s={};r=0;i=a+l[3]-1;for l=a+1,i do r=r+1;s[r]=o[l];end;F={o[a](f(s,1,i-a))};i=a+l[5]-2;r=0;for l=a,i do r=r+1;o[l]=F[r];end;d=i;e=e+1;l=n[e];o[l[2]]=t[c[l[3]]];else o[l[2]]=B(V[l[3]],nil,t);end;elseif a==49 then local e=l[2];local c={};local n=0;local l=e+l[3]-1;for l=e+1,l do n=n+1;c[n]=o[l];end;o[e](f(c,1,l-e));d=e;else local l=l[2];local c={};local e=0;local n=d;for l=l+1,n do e=e+1;c[e]=o[l];end;o[l](f(c,1,n-l));d=l;end;elseif a<=54 then if a<=52 then if a>51 then do return end;else o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]]=o[l[3]][c[l[5]]];e=e+1;l=n[e];o[l[2]][c[l[3]]]=o[l[5]];e=e+1;l=n[e];e=e+l[3];end;elseif a==53 then if o[l[2]]then e=e+1;else e=e+l[3];end;else local n=l[2];local a=l[5];local l=n+2;local c={o[n](o[n+1],o[l])};for e=1,a do o[l+e]=c[e];end;local n=o[n+3];if n then o[l]=n else e=e+1;end;end;elseif a<=56 then if a>55 then local n=l[2];local c={};local e=0;local l=n+l[3]-1;for l=n+1,l do e=e+1;c[e]=o[l];end;local c,l=h(o[n](f(c,1,l-n)));l=l+n-1;e=0;for l=n,l do e=e+1;o[l]=c[e];end;d=l;else o[l[2]]=(l[3]~=0);end;elseif a==57 then local n=l[2];local a=l[5];local l=n+2;local c={o[n](o[n+1],o[l])};for e=1,a do o[l+e]=c[e];end;local n=o[n+3];if n then o[l]=n else e=e+1;end;else if o[l[2]]then e=e+1;else e=e+l[3];end;end;e=e+1;end;end;end;return B(C(),{},N())();
local rigel = require "rigel" local types = require "types" local S = require "systolic" local systolic = S local Ssugar = require "systolicsugar" local fpgamodules = require("fpgamodules") local SDFRate = require "sdfrate" local J = require "common" local memoize = J.memoize local err = J.err local SDF = require "sdf" local Uniform = require "uniform" local verilogSanitize = J.verilogSanitize local sanitize = verilogSanitize local MT if terralib~=nil then MT = require("generators.modulesTerra") end local data = rigel.data local valid = rigel.valid local ready = rigel.ready local modules = {} -- tab should be a table of systolic ASTs, all type array2d. Heights should match local function concat2dArrays(tab) assert( type(tab)=="table") assert( #tab>0) assert( systolic.isAST(tab[1])) assert( tab[1].type:isArray() ) local H, ty = (tab[1].type:arrayLength())[2], tab[1].type:arrayOver() local totalW = 0 local res = {} for y=0,H-1 do for _,v in ipairs(tab) do assert( systolic.isAST(v) ) assert( v.type:isArray() ) assert( H==(v.type:arrayLength())[2] ) assert( ty==v.type:arrayOver() ) local w = (v.type:arrayLength())[1] if y==0 then totalW = totalW + w end table.insert(res, S.slice( v, 0, w-1, y, y ) ) end end return S.cast( S.tuple(res), types.array2d(ty,totalW,H) ) end -- *this should really be in examplescommon.t -- f(g()) -- inputType: if g is a generator, we won't know its input type. Allow user to explicitly pass it. modules.compose = memoize(function( name, f, g, generatorStr, inputType, inputSDF ) err( type(name)=="string", "first argument to compose must be name of function") err( rigel.isFunction(f), "compose: second argument should be rigel module") err( rigel.isPlainFunction(g) or inputType~=nil, "compose: third argument should be plain rigel function, but is: ",g) if inputType~=nil then err( types.isType(inputType), "compose: inputType should be type, but is: "..tostring(inputType) ) else inputType = g.inputType end if inputSDF~=nil then err( SDF.isSDF(inputSDF),"compose: inputSDF should be SDF") else inputSDF = g.sdfInput end name = J.verilogSanitize(name) local inp = rigel.input( inputType, inputSDF ) local gvalue = rigel.apply(J.verilogSanitize(name.."_g"),g,inp) return modules.lambda( name, inp, rigel.apply(J.verilogSanitize(name.."_f"),f,gvalue), nil, generatorStr ) end) -- *this should really be in examplescommon.t -- This converts SoA to AoS -- ie {Arr2d(a,W,H),Arr2d(b,W,H),...} to Arr2d({a,b,c},W,H) -- if asArray==true then converts {Arr2d(a,W,H),Arr2d(b,W,H),...} to Arr2d(a[N],W,H). This requires a,b,c be the same... -- framedW, framedH, if not nil, will let us operate on ParSeqs modules.SoAtoAoS = memoize(function( W, H, typelist, asArray, framedW, framedH ) err( type(W)=="number", "SoAtoAoS: first argument should be number (width)") err( type(H)=="number", "SoAtoAoS: second argument should be number (height)") err( W*H>0, "SoAtoAoS: W*H must be >0, W: ",W," H:",H) err( type(typelist)=="table", "SoAtoAoS: typelist must be table") err( J.keycount(typelist)==#typelist, "SoAtoAoS: typelist must be lua array") err( asArray==nil or type(asArray)=="boolean", "SoAtoAoS: asArray must be bool or nil") if asArray==nil then asArray=false end for k,v in ipairs(typelist) do err(types.isType(v),"SoAtoAoS: typelist index "..tostring(k).." must be rigel type") err( v:isData(),"SoAtoAoS: input should be list of data type, but is: "..tostring(v)) end local res if (W*H)%2==0 and asArray==false then -- codesize optimization (make codesize log(n) instead of linear) local C = require "generators.examplescommon" local itype = types.rv(types.Par(types.tuple( J.map(typelist, function(t) return types.array2d(t,W,H) end) ))) local I = rigel.input( itype ) local IA = {} local IB = {} for k,t in ipairs(typelist) do local i = rigel.apply("II"..tostring(k-1), C.index(itype:deInterface(),k-1), I) local ic = rigel.apply( "cc"..tostring(k-1), C.cast( types.array2d( t, W, H ), types.array2d( t, W*H ) ), i) local ica = rigel.apply("ica"..tostring(k-1), C.slice(types.array2d( t, W*H ),0,(W*H)/2-1,0,0), ic) local icb = rigel.apply("icb"..tostring(k-1), C.slice(types.array2d( t, W*H ),(W*H)/2,(W*H)-1,0,0), ic) table.insert(IA,ica) table.insert(IB,icb) end IA = rigel.concat("IA",IA) IB = rigel.concat("IB",IB) local oa = rigel.apply("oa", modules.SoAtoAoS((W*H)/2,1,typelist,asArray), IA) local ob = rigel.apply("ob", modules.SoAtoAoS((W*H)/2,1,typelist,asArray), IB) local out = rigel.concat("conc", {oa,ob}) --local T = types.array2d( types.tuple(typelist), (W*H)/2 ) out = rigel.apply( "cflat", C.flatten2( types.tuple(typelist), W*H ), out) out = rigel.apply( "cflatar", C.cast( types.array2d( types.tuple(typelist), W*H ), types.array2d( types.tuple(typelist), W,H ) ), out) res = modules.lambda(verilogSanitize("SoAtoAoS_pow2_W"..tostring(W).."_H"..tostring(H).."_types"..tostring(typelist).."_asArray"..tostring(asArray).."_framedW"..tostring(framedW).."_framedH"..tostring(framedH)), I, out) else res = { kind="SoAtoAoS", W=W, H=H, asArray = asArray } res.inputType = types.tuple( J.map(typelist, function(t) return types.array2d(t,W,H) end) ) if asArray then J.map( typelist, function(n) err(n==typelist[1], "if asArray==true, all elements in typelist must match, but tuple item 0 types is:",typelist[1]," but item ? type is:",n) end ) res.outputType = types.array2d(types.array2d(typelist[1],#typelist),W,H) else res.outputType = types.array2d(types.tuple(typelist),W,H) end res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay = 0 res.stateful=false res.name = verilogSanitize("SoAtoAoS_W"..tostring(W).."_H"..tostring(H).."_types"..tostring(typelist).."_asArray"..tostring(asArray).."_framedW"..tostring(framedW).."_framedH"..tostring(framedH)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter("process_input", res.inputType:lower() ) local arrList = {} for y=0,H-1 do for x=0,W-1 do local r = S.tuple(J.map(J.range(0,#typelist-1), function(i) return S.index(S.index(sinp,i),x,y) end)) if asArray then r = S.cast(r, types.array2d(typelist[1],#typelist) ) end table.insert( arrList, r ) end end systolicModule:addFunction( S.lambda("process", sinp, S.cast(S.tuple(arrList),rigel.lower(res.outputType)), "process_output") ) return systolicModule end res = rigel.newFunction(res) end if framedW~=nil then -- hackity hack local inputType = types.rv(types.tuple( J.map(typelist, function(t) return types.ParSeq(types.array2d(t,W,H),framedW,framedH) end) )) local outputType if asArray then outputType = types.rv(types.ParSeq(types.array2d(types.Array2d(typelist[1],#typelist),W,H),framedW,framedH )) else outputType = types.rv(types.ParSeq(types.array2d(types.tuple(typelist),W,H),framedW,framedH )) end assert(res.inputType:lower()==inputType:lower()) assert(res.outputType:lower()==outputType:lower()) res.inputType = inputType res.outputType = outputType end if terralib~=nil then res.terraModule = MT.SoAtoAoS(res,W,H,typelist,asArray) end return res end) -- Zips Seq types (this is just a trivial conversion) -- takes rv([A{W,H},B{W,H},C{W,H}]) to rv({A,B,C}{W,H}) -- typelist: list of {A,B,C} schedule types modules.ZipSeq = memoize(function( var, W, H, ... ) err( Uniform.isUniform(W) or type(W)=="number", "ZipSchedules: first argument should be number (width), but is:",W) err( Uniform.isUniform(H) or type(H)=="number", "ZipSchedules: second argument should be number (height), but is:",H) local typelist = {...} err( type(typelist)=="table", "ZipSchedules: typelist must be table") err( J.keycount(typelist)==#typelist, "ZipSchedules: typelist must be lua array") assert(type(var)=="boolean") local typeString = "" local itype = {} -- if all schedules are Seq(Par(data)), get rid of the Pars as a courtesy local terminal = true for k,v in ipairs(typelist) do err( types.isType(v),"ZipSchedules: typelist index "..tostring(k).." must be rigel type") err( v:isSchedule(),"ZipSchedules: input should be list of schedule types, but is: "..tostring(v)) if (v:is("Par") and v.over:isData())==false then terminal = false end typeString = typeString.."_"..tostring(v) if var then table.insert(itype,types.VarSeq(v,W,H)) else table.insert(itype,types.Seq(v,W,H)) end end local inputType = types.rv(types.tuple(itype)) local G = require "generators.core" local res = G.Function{"ZipSchedules_W"..tostring(W).."_H"..tostring(H).."_var"..tostring(var)..typeString,types.rv(types.Par(inputType:lower())),SDF{1,1},function(inp) return inp end} assert(res.inputType:lower()==inputType:lower()) res.inputType = inputType local typeOut = types.Tuple(typelist) if terminal then local newlist = {} for k,v in ipairs(typelist) do table.insert(newlist,v.over) end typeOut = types.Par(types.Tuple(newlist)) end -- hackity hack local outputType if var then outputType = types.rv(types.VarSeq(typeOut,W,H)) else outputType = types.rv(types.Seq(typeOut,W,H)) end assert(res.outputType:lower()==outputType:lower()) res.outputType = outputType return res end) -- Converst {Handshake(a), Handshake(b)...} to Handshake{a,b} -- typelist should be a table of pure types -- WARNING: ready depends on ValidIn -- arraySize: if not nil, accept an array instead of a tuple (typelist should just be a type then) modules.packTuple = memoize(function( typelist, disableFIFOCheck, arraySize, X ) err( type(typelist)=="table", "packTuple: type list must be table, but is: "..tostring(typelist) ) err( disableFIFOCheck==nil or type(disableFIFOCheck)=="boolean", "packTuple: disableFIFOCheck must be nil or bool" ) err( X==nil, "packTuple: too many arguments" ) local res = {kind="packTuple", disableFIFOCheck = disableFIFOCheck} for k,t in ipairs(typelist) do err( types.isType(t),"packTuple: typelist should be list of types, but is:",t) err(t:isRV(),"packTuple: should be list of RV types, but is: "..tostring(t)) end if arraySize==nil then res.inputType = types.tuple(typelist) local schedList = {} local schedListOver = {} local allPar = true -- backwards compatibility hack if typelist[1]==types.RV() then -- handshake trigger tuple res.outputType=types.RV() else for k,v in ipairs(typelist) do table.insert(schedList,v.over) table.insert(schedListOver,v.over.over) if v.over:is("Par")==false then allPar=false end end if allPar then res.outputType = types.RV(types.Par(types.tuple(schedListOver))) else res.outputType = types.RV(types.tuple(schedList)) end end else print("NYI - packTuple over an array") assert(false) end res.stateful = false res.sdfOutput = SDF{1,1} res.sdfInput = SDF(J.map(typelist, function(n) return {1,1} end)) res.name = J.sanitize("packTuple_"..tostring(typelist)) res.delay = 0 if terralib~=nil then res.terraModule = MT.packTuple(res,typelist) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local CE local sinp = S.parameter("process_input", rigel.lower(res.inputType) ) --systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro",nil,nil,CE) ) systolicModule:onlyWire(true) local printStr = "IV ["..table.concat( J.broadcast("%d",#typelist),",").."] OV %d ready ["..table.concat(J.broadcast("%d",#typelist),",").."] readyDownstream %d" local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple(J.broadcast(types.bool(),(#typelist)*2+2)), printStr):instantiate("printInst") ) end local activePorts={} for k,v in pairs(typelist) do table.insert(activePorts,k) end local inputValues = S.tuple(J.map(J.range(0,#typelist-1), function(i) return S.index(S.index(sinp,i),0) end)) -- valid bit is the AND of all the inputs local validInList = J.map(J.range(0,#typelist-1),function(i) return S.index(S.index(sinp,i),1) end) local validOut = J.foldt(validInList,function(a,b) return S.__and(a,b) end,"X") local pipelines={} local downstreamReady = S.parameter("ready_downstream", types.bool()) -- we only want this module to be ready if _all_ streams have data. -- WARNING: this makes ready depend on ValidIn local readyOutList = {} for i=1,#typelist do -- if this stream doesn't have data, let it run regardless. local valid_i if typelist[1]==types.RV() then -- HandshakeTrigger mode valid_i = S.index(sinp,i-1) else valid_i = S.index(S.index(sinp,i-1),1) end table.insert( readyOutList, S.__or(S.__and( downstreamReady, validOut), S.__not(valid_i) ) ) end local readyOut = S.tuple(readyOutList) if arraySize~=nil then assert(false) readyOut = S.cast(readyOut, types.array2d(types.bool(),#typelist) ) end --if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process(S.tuple(concat(concat(validInFullList,{validOut}),concat(readyOutList,{downstreamReady})))) ) end local out if typelist[1]==types.RV() then -- HandshakeTrigger mode out = validOut else out = S.tuple{inputValues, validOut} end systolicModule:addFunction( S.lambda("process", sinp, out, "process_output", pipelines) ) systolicModule:addFunction( S.lambda("ready", downstreamReady, readyOut, "ready" ) ) return systolicModule end return rigel.newFunction(res) end) -- lift rv->rv to rv->rvV modules.liftBasic = memoize(function(f) err(rigel.isFunction(f),"liftBasic argument should be darkroom function") local res = {kind="liftBasic", fn = f} err( f.inputType:isrv(), "liftBasic: f input type should be rv, but is: "..tostring(f.inputType)) err( f.outputType:isrv(), "liftBasic: f output type should be rv, but is: "..tostring(f.outputType)) res.inputType = f.inputType res.outputType = types.rvV(f.outputType.over) res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.RVDelay = f.RVDelay res.delay = f.delay res.stateful = f.stateful res.name = J.sanitize("LiftBasic_"..f.name) if terralib~=nil then res.terraModule = MT.liftBasic(res,f) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local inner = systolicModule:add( f.systolicModule:instantiate("LiftBasic_inner") ) local sinp = S.parameter("process_input", rigel.lower(res.inputType) ) local CE if f.stateful or f.delay>0 then CE = S.CE("CE") end systolicModule:addFunction( S.lambda("process", sinp, S.tuple{ inner:process(sinp), S.constant(true, types.bool())}, "process_output", nil, nil, CE ) ) if f.stateful then systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), inner:reset(), "ro", {},S.parameter("reset",types.bool())) ) end systolicModule:complete() return systolicModule end return rigel.newFunction(res) end) local function passthroughSystolic( res, systolicModule, inner, passthroughFns, onlyWire ) assert(type(passthroughFns)=="table") for _,fnname in pairs(passthroughFns) do local srcFn = systolicModule:lookupFunction(fnname) local VALID if onlyWire and srcFn.implicitValid==false then VALID = srcFn:getValid() end local fn = Ssugar.lambdaConstructor( fnname, srcFn:getInput().type, srcFn:getInput().name, J.sel(srcFn.implicitValid,nil,srcFn:getValid().name) ) fn:setOutput( inner[fnname]( inner, srcFn:getInput(), VALID ), srcFn:getOutputName() ) fn:setCE(srcFn:getCE()) res:addFunction(fn) local readySrcFn = systolicModule:lookupFunction(fnname.."_ready") if readySrcFn~=nil then res:addFunction( S.lambda(fnname.."_ready", readySrcFn:getInput(), inner[fnname.."_ready"]( inner, readySrcFn:getInput() ), readySrcFn:getOutputName(), nil, readySrcFn:getValid(), readySrcFn:getCE() ) ) end local resetSrcFn = systolicModule:lookupFunction(fnname.."_reset") if resetSrcFn~=nil then res:addFunction( S.lambda(fnname.."_reset", resetSrcFn:getInput(), inner[fnname.."_reset"]( inner, resetSrcFn:getInput() ), resetSrcFn:getOutputName(), nil, resetSrcFn:getValid() ) ) end res:setDelay(fnname,systolicModule:getDelay(fnname)) end end -- This takes a basic->R to V->RV -- Compare to waitOnInput below: runIffReady is used when we want to take control of the ready bit purely for performance reasons, but don't want to amplify or decimate data. local function runIffReadySystolic( systolicModule, fns, passthroughFns ) if Ssugar.isModuleConstructor(systolicModule) then systolicModule = systolicModule:toModule() end local res = Ssugar.moduleConstructor("RunIffReady_"..systolicModule.name) local inner = res:add( systolicModule:instantiate("RunIffReady") ) for _,fnname in pairs(fns) do local srcFn = systolicModule:lookupFunction(fnname) local prefix = fnname.."_" if fnname=="process" then prefix="" end err( systolicModule:getDelay(prefix.."ready")==0, "ready bit should not be pipelined") local sinp if srcFn:getInput().type==types.Interface() then sinp = S.parameter(fnname.."_input", types.null() ) else sinp = S.parameter(fnname.."_input", types.lower(types.V(types.Par(srcFn:getInput().type))) ) end local svalid = S.parameter(fnname.."_valid", types.bool()) local runable = S.__and(inner[prefix.."ready"](inner), S.index(sinp,1) ):disablePipelining() local out = inner[fnname]( inner, S.index(sinp,0), runable ) if out.type~=types.null() then out = S.tuple{ out, S.__and( runable,svalid ):disablePipelining() } end if systolicModule:lookupFunction(prefix.."reset")~=nil then local RST = S.parameter(prefix.."reset",types.bool()) if systolicModule:lookupFunction(prefix.."reset"):isPure() then RST=S.constant(false,types.bool()) end res:addFunction( S.lambda(prefix.."reset", S.parameter(prefix.."r",types.null()), inner[prefix.."reset"](inner), "ro", {}, RST) ) end local pipelines = {} local CE = S.CE("CE") res:addFunction( S.lambda(fnname, sinp, out, fnname.."_output", pipelines, svalid, CE ) ) res:addFunction( S.lambda(prefix.."ready", S.parameter(prefix.."readyinp",types.null()), inner[prefix.."ready"](inner), prefix.."ready", {} ) ) end passthroughSystolic( res, systolicModule, inner, passthroughFns ) return res end local function waitOnInputSystolic( systolicModule, fns, passthroughFns ) local res = Ssugar.moduleConstructor(J.sanitize("WaitOnInput_"..systolicModule.name)) local inner = res:add( systolicModule:instantiate("WaitOnInput_inner") ) for _,fnname in pairs(fns) do local srcFn = systolicModule:lookupFunction(fnname) local prefix = fnname.."_" if fnname=="process" then prefix="" end err( systolicModule:getDelay(prefix.."ready")==0, "ready bit should not be pipelined") local printInst if DARKROOM_VERBOSE then printInst = res:add( S.module.print( types.tuple{types.bool(),types.bool(),types.bool(),types.bool()}, "WaitOnInput "..systolicModule.name.." ready %d validIn %d runable %d RST %d", true ):instantiate(prefix.."printInst") ) end local sinp = S.parameter(fnname.."_input", rigel.lower(rigel.V(types.Par(srcFn:getInput().type))) ) local svalid = S.parameter(fnname.."_valid", types.bool()) local runable = S.__or(S.__not(inner[prefix.."ready"](inner)), S.index(sinp,1) ):disablePipelining() local out = inner[fnname]( inner, S.index(sinp,0), runable ) local RST = S.parameter(prefix.."reset",types.bool()) -- if systolicModule:lookupFunction(prefix.."reset"):isPure() then RST=S.constant(false,types.bool()) end local pipelines = {} -- Actually, it's ok for (ready==false and valid(inp)==true) to be true. We do not have to read when ready==false, we can just ignore it. if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process( S.tuple{inner[prefix.."ready"](inner),S.index(sinp,1), runable, RST} ) ) end local CE = S.CE("CE") res:addFunction( S.lambda(fnname, sinp, S.tuple{ S.index(out,0), S.__and(S.index(out,1),S.__and(runable,svalid):disablePipelining()):disablePipeliningSingle() }, fnname.."_output", pipelines, svalid, CE ) ) res:addFunction( S.lambda(prefix.."reset", S.parameter(prefix.."r",types.null()), inner[prefix.."reset"](inner), "ro", {}, RST) ) res:addFunction( S.lambda(prefix.."ready", S.parameter(prefix.."readyinp",types.null()), inner[prefix.."ready"](inner), prefix.."ready", {} ) ) end passthroughSystolic( res, systolicModule, inner, passthroughFns ) return res end -- This is basically just for testing: artificially reduces the throughput along a path modules.reduceThroughput = memoize(function(A,factor,X) err( type(factor)=="number", "reduceThroughput: second argument must be number (reduce factor)" ) err( factor>1, "reduceThroughput: reduce factor must be >1" ) err( math.floor(factor)==factor, "reduceThroughput: reduce factor must be an integer" ) assert(X==nil) err( types.isType(A) and A:isData(), "reduceThroughput: input type should be Data, but is: "..tostring(A) ) local res = {kind="reduceThroughput",factor=factor} res.inputType = types.rv(types.Par(A)) res.outputType = types.rRvV(types.Par(A)) res.sdfInput = SDF{1,factor} res.sdfOutput = SDF{1,factor} res.stateful = true res.delay = 0 res.name = "ReduceThroughput_"..tostring(factor) if terralib~=nil then res.terraModule = MT.reduceThroughput(res,A,factor) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local phase = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIfWrap( types.uint(16), factor-1, 1 ) ):CE(true):setInit(0):setReset(0):instantiate("phase") ) local reading = S.eq( phase:get(), S.constant(0,types.uint(16)) ):disablePipelining() local sinp = S.parameter( "inp", A ) local pipelines = {} table.insert(pipelines, phase:setBy(S.constant(true,types.bool()))) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.tuple{sinp,reading}, "process_output", pipelines, nil, CE) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), reading, "ready", {} ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {phase:reset()},S.parameter("reset",types.bool())) ) return systolicModule end return modules.waitOnInput( rigel.newFunction(res) ) end) -- f should be basic->RV -- You should never use basic->RV directly! S->SRV's input should be valid iff ready==true. This is not the case with normal Stateful functions! -- if inner:ready()==true, inner will run iff valid(input)==true -- if inner:ready()==false, inner will run always. Input will be garbage, but inner isn't supposed to be reading from it! (this condition is used for upsample, for example) modules.waitOnInput = memoize(function( f, X ) err(rigel.isFunction(f),"waitOnInput argument should be darkroom function") err( X==nil, "waitOnInput: too many arguments" ) local res = {kind="waitOnInput", fn = f} err( f.inputType:isrv(), "waitOnInput of fn '"..f.name.."': input type should be rv, but is: "..tostring(f.inputType)) err( f.outputType:isrRvV(), "waitOnInput: output type should be rRvV, but is: "..tostring(f.outputType)) res.inputType = types.rV(f.inputType.over) res.outputType = types.rRV(f.outputType.over) err(f.delay == math.floor(f.delay), "waitOnInput, delay is fractional?") err( type(f.sdfInput)=="table", "Missing SDF rate for fn "..f.kind) res.sdfInput, res.sdfOutput = f.sdfInput, f.sdfOutput err( type(f.stateful)=="boolean", "Missing stateful annotation for fn "..f.kind) res.stateful = f.stateful res.delay = f.delay res.RVDelay = f.RVDelay res.name = J.verilogSanitize("WaitOnInput_"..f.name) res.inputBurstiness = f.inputBurstiness res.outputBurstiness = f.outputBurstiness if terralib~=nil then res.terraModule = MT.waitOnInput(res,f) end function res.makeSystolic() assert( S.isModule(f.systolicModule) ) local sm = waitOnInputSystolic( f.systolicModule, {"process"},{} ) return sm end return rigel.newFunction(res) end) local function liftDecimateSystolic( systolicModule, liftFns, passthroughFns, handshakeTrigger, includeCE, X ) if Ssugar.isModuleConstructor(systolicModule) then systolicModule=systolicModule:toModule() end assert( S.isModule(systolicModule) ) assert(type(handshakeTrigger)=="boolean") assert(type(includeCE)=="table") local res = Ssugar.moduleConstructor( J.sanitize("LiftDecimate_"..systolicModule.name) ) local inner = res:add( systolicModule:instantiate("LiftDecimate") ) for k,fnname in pairs(liftFns) do local srcFn = systolicModule:lookupFunction(fnname) local prefix = fnname.."_" if fnname=="process" then prefix="" end local sinp local datai local validi if srcFn.inputParameter.type==types.null() and handshakeTrigger==false then sinp = S.parameter(fnname.."_input", types.null() ) elseif srcFn.inputParameter.type==types.null() and handshakeTrigger then sinp = S.parameter(fnname.."_input", types.bool() ) validi = sinp else sinp = S.parameter(fnname.."_input", rigel.lower(types.V(types.Par(srcFn.inputParameter.type))) ) datai = S.index(sinp,0) validi = S.index(sinp,1) end local pout = inner[fnname]( inner, datai, validi ) --local local pout_data, pout_valid if pout.type:isTuple() and #pout.type.list==2 then pout_data = S.index(pout,0) pout_valid = S.index(pout,1) elseif pout.type:isBool() then pout_valid = pout else print("liftDecimateDystolic of "..systolicModule.name.." NYI type "..tostring(pout.type)) assert(false) end local validout = pout_valid if srcFn.inputParameter.type~=types.null() then validout = S.__and(pout_valid,validi) end local CE if includeCE[k] then CE = S.CE(prefix.."CE") end -- local CE -- if srcFn.CE~=nil then -- CE = S.CE(prefix.."CE") -- end if pout_data==nil then res:addFunction( S.lambda(fnname, sinp, validout, fnname.."_output",nil,nil,CE ) ) else res:addFunction( S.lambda(fnname, sinp, S.tuple{pout_data, validout}, fnname.."_output",nil,nil,CE ) ) end if systolicModule:lookupFunction(prefix.."reset")~=nil then -- stateless modules don't have a reset res:addFunction( S.lambda(prefix.."reset", S.parameter("r",types.null()), inner[prefix.."reset"](inner), "ro", {},S.parameter(prefix.."reset",types.bool())) ) end if srcFn.inputParameter.type==types.null() and handshakeTrigger==false then -- if fn has null input, ready shouldn't return anything res:addFunction( S.lambda(prefix.."ready", S.parameter(prefix.."readyinp",types.null()), nil, prefix.."ready", {} ) ) else res:addFunction( S.lambda(prefix.."ready", S.parameter(prefix.."readyinp",types.null()), S.constant(true,types.bool()), prefix.."ready", {} ) ) end end passthroughSystolic( res, systolicModule, inner, passthroughFns ) return res end -- takes basic->V to V->RV -- if handshakeTrigger==true, then nil->V(A) maps to VTrigger->RV(A) modules.liftDecimate = memoize(function(f, handshakeTrigger, X) err( rigel.isFunction(f), "liftDecimate: input should be rigel module" ) err( X==nil, "liftDecimate: too many arguments") if handshakeTrigger==nil then handshakeTrigger=true end local res = {kind="liftDecimate", fn = f} err( f.inputType:isrv() or f.inputType==types.Interface(), "liftDecimate: fn '"..f.name.."' input type should be rv, but is: "..tostring(f.inputType) ) err( f.outputType:isrvV(), "liftDecimate: fn '"..f.name.."' output type should be rvV, but is: "..tostring(f.outputType) ) res.name = J.sanitize("LiftDecimate_"..f.name) res.inputType = types.rV(f.inputType.over) res.outputType = types.rRV(f.outputType.over) res.inputBurstiness = f.inputBurstiness res.outputBurstiness = f.outputBurstiness err(type(f.stateful)=="boolean", "Missing stateful annotation for "..f.kind) res.stateful = f.stateful err( rigel.SDF==false or SDFRate.isSDFRate(f.sdfInput), "Missing SDF rate for fn "..f.kind) res.sdfInput, res.sdfOutput = f.sdfInput, f.sdfOutput res.RVDelay = f.RVDelay res.delay = f.delay res.requires = {} for inst,fnmap in pairs(f.requires) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.requires,{inst,fnname},1) end end res.provides = {} for inst,fnmap in pairs(f.provides) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.provides,{inst,fnname},1) end end if terralib~=nil then res.terraModule = MT.liftDecimate(res,f) end function res.makeSystolic() err( S.isModule(f.systolicModule), "Missing/incorrect systolic for "..f.name ) return liftDecimateSystolic( f.systolicModule, {"process"}, {}, handshakeTrigger, {f.stateful or f.delay>0} ) end local res = rigel.newFunction(res) return res end) -- converts V->RV to RV->RV modules.RPassthrough = memoize(function(f) local res = {kind="RPassthrough", fn = f} --rigel.expectV(f.inputType) err( f.inputType:isrV(),"RPassthrough: fn input should br rV, but is: "..tostring(f.inputType) ) err( f.outputType:isrRV(),"RPassthrough: fn output type should be rRV, but is: "..tostring(f.outputType) ) res.inputType = types.rRV(f.inputType:deInterface()) res.outputType = f.outputType err( rigel.SDF==false or type(f.sdfInput)=="table", "Missing SDF rate for fn "..f.kind) res.sdfInput, res.sdfOutput = f.sdfInput, f.sdfOutput err( type(f.stateful)=="boolean", "Missing stateful annotation for "..f.kind) res.stateful = f.stateful res.delay = f.delay if terralib~=nil then res.terraModule = MT.RPassthrough(res,f) end res.name = "RPassthrough_"..f.name function res.makeSystolic() err( f.systolicModule~=nil, "RPassthrough null module "..f.kind) local systolicModule = Ssugar.moduleConstructor(res.name) local inner = systolicModule:add( f.systolicModule:instantiate("RPassthrough_inner") ) local sinp = S.parameter("process_input", rigel.lower(res.inputType) ) -- this is dumb: we don't actually use the 'ready' bit in the struct (it's provided by the ready function). -- but we include it to distinguish the types. local out = inner:process( S.tuple{ S.index(sinp,0), S.index(sinp,1)} ) local CE if f.delay>0 or f.stateful then CE = S.CE("CE") end systolicModule:addFunction( S.lambda("process", sinp, S.tuple{ S.index(out,0), S.index(out,1) }, "process_output", nil, nil, CE ) ) if f.stateful then systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), inner:reset(), "ro", {}, S.parameter("reset",types.bool())) ) end local rinp = S.parameter("ready_input", types.bool() ) systolicModule:addFunction( S.lambda("ready", rinp, S.__and(inner:ready(),rinp):disablePipelining(), "ready", {} ) ) return systolicModule end return rigel.newFunction(res) end) local function liftHandshakeSystolic( systolicModule, liftFns, passthroughFns, hasReadyInput, hasCE, hasReset, X ) if Ssugar.isModuleConstructor(systolicModule) then systolicModule = systolicModule:toModule() end err( S.isModule(systolicModule), "liftHandshakeSystolic: systolicModule not a systolic module?" ) assert(type(hasReadyInput)=="table") assert(type(hasCE)=="table") assert(type(hasReset)=="boolean") assert(X==nil) local res = Ssugar.moduleConstructor( J.sanitize("LiftHandshake_"..systolicModule.name) ):onlyWire(true):parameters({INPUT_COUNT=0, OUTPUT_COUNT=0}) local inner = res:add(systolicModule:instantiate( J.sanitize("inner") )) if Ssugar.isModuleConstructor(systolicModule) then systolicModule:complete(); systolicModule=systolicModule.module end local resetPipelines = {} passthroughSystolic( res, systolicModule, inner, passthroughFns, true ) if res:lookupFunction("reset")==nil and hasReset then -- we need a reset for the shift register or something? res:addFunction( Ssugar.lambdaConstructor( "reset", types.null(), "reset" ) ) end for K,fnname in pairs(liftFns) do local srcFn = systolicModule:lookupFunction(fnname) local prefix = fnname.."_" if fnname=="process" then prefix="" end local printInst --if DARKROOM_VERBOSE then printInst = res:add( S.module.print( types.tuple{types.bool(), srcFn:getInput().type.list[1],types.bool(),srcFn:getOutput().type.list[1],types.bool(),types.bool(),types.bool(),types.uint(16), types.uint(16)}, fnname.." RST %d I %h IV %d O %h OV %d readyDownstream %d ready %d outputCount %d expectedOutputCount %d"):instantiate(prefix.."printInst") ) end local outputCount --if STREAMING==false and DARKROOM_VERBOSE then outputCount = res:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIf() ):CE(true):instantiate(prefix.."outputCount") ) end local pinp = S.parameter(fnname.."_input", srcFn:getInput().type ) local downstreamReady local CE if hasReadyInput[K] then downstreamReady = S.parameter(prefix.."ready_downstream", types.bool()) CE = downstreamReady else downstreamReady = S.parameter(prefix.."ready_downstream", types.null()) CE = S.constant(true,types.bool()) end local pout = inner[fnname](inner,pinp,S.constant(true,types.bool()), J.sel(hasCE[K],CE,nil) ) if pout.type:isTuple() and #pout.type.list==2 then elseif pout.type==types.null() then elseif pout.type:isBool() then else print("liftHandshakeSystolic: unexpected return type? "..tostring(pout.type).." FNNAME:"..fnname) assert(false) end -- not blocked downstream: either downstream is ready (downstreamReady), or we don't have any data anyway (pout[1]==false), so we can work on clearing the pipe -- Actually - I don't think this is legal. We can't have our stall signal depend on our own output. We would have to register it, etc --local notBlockedDownstream = S.__or(downstreamReady, S.eq(S.index(pout,1),S.constant(false,types.bool()) )) --local CE = notBlockedDownstream -- the point of the shift register: systolic doesn't have an output valid bit, so we have to explicitly calculate it. -- basically, for the first N cycles the pipeline is executed, it will have garbage in the pipe (valid was false at the time those cycles occured). So we need to gate the output by the delayed valid bits. This is a little big goofy here, since process_valid is always true, except for resets! It's not true for the first few cycles after resets! And if we ignore that the first few outputs will be garbage! local SR, out if pout.type~=types.null() then SR = res:add( fpgamodules.shiftRegister( types.bool(), systolicModule:getDelay(fnname), false, true ):instantiate( J.sanitize(prefix.."validBitDelay") ) ) local srvalue = SR:process(S.constant(true,types.bool()), S.constant(true,types.bool()), CE ) local outvalid if pout.type:isBool() then -- IE RVTrigger outvalid = S.__and( pout, srvalue ) else outvalid = S.__and(S.index(pout,1), srvalue ) end local outvalidRaw = outvalid --if STREAMING==false then outvalid = S.__and( outvalid, S.lt(outputCount:get(),S.instanceParameter("OUTPUT_COUNT",types.uint(16)))) end if pout.type:isBool() then -- RVTrigger out = outvalid else out = S.tuple{ S.index(pout,0), outvalid } end else out = pout end local readyOut err( systolicModule.functions[prefix.."ready"]~=nil, "LiftHandshake, module is missing ready fn? module '"..systolicModule.name.."', fn "..tostring(prefix).."ready") if hasReadyInput[K] and systolicModule.functions[prefix.."ready"].output~=nil and systolicModule.functions[prefix.."ready"].output.type~=types.null() then readyOut = systolic.__and(inner[prefix.."ready"](inner),downstreamReady) else readyOut = inner[prefix.."ready"](inner) end local pipelines = {} --if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process( S.tuple{ rst, S.index(pinp,0), S.index(pinp,1), S.index(out,0), S.index(out,1), downstreamReady, readyOut, outputCount:get(), S.instanceParameter("OUTPUT_COUNT",types.uint(16)) } ) ) end --if STREAMING==false and DARKROOM_VERBOSE then table.insert(pipelines, outputCount:setBy(outvalid, S.__not(rst), CE) ) end res:addFunction( S.lambda(fnname, pinp, out, fnname.."_output", pipelines ) ) if pout.type~=types.null() and hasReset then --err(res:lookupFunction("reset")~=nil, "Reset is missing on module '",systolicModule.name,"'? ",systolicModule) table.insert(resetPipelines, SR:reset( nil, res:lookupFunction("reset"):getValid() )) end assert( systolicModule:getDelay(prefix.."ready")==0 ) -- ready bit calculation can't be pipelined! That wouldn't make any sense res:addFunction( S.lambda(prefix.."ready", downstreamReady, readyOut, prefix.."ready" ) ) res:setDelay(fnname,systolicModule:getDelay(fnname)) end if hasReset then assert(res:lookupFunction("reset")~=nil) for _,p in pairs(resetPipelines) do assert( Ssugar.isFunctionConstructor(res:lookupFunction("reset")) ) res:lookupFunction("reset"):addPipeline(p) end end return res end -- takes V->RV to Handshake->Handshake -- if input type is null, and handshakeTrigger==true, we produce input type HandshakeTrigger -- if input type is null, and handshakeTrigger==false, we produce input type null modules.liftHandshake = memoize(function( f, handshakeTrigger, X ) err( X==nil, "liftHandshake: too many arguments" ) local res = {kind="liftHandshake", fn=f} err( f.inputType:isrV(), "liftHandshake of fn '"..f.name.."': expected rV input interface type, but is "..tostring(f.inputType)) err( f.outputType:isrRV() ,"liftHandshake: expected rRV output type, but is: "..tostring(f.outputType)) res.inputType = types.RV(f.inputType.over) res.outputType = types.RV(f.outputType.over) res.inputBurstiness = f.inputBurstiness res.outputBurstiness = f.outputBurstiness res.name = J.sanitize("LiftHandshake_"..f.name) err( rigel.SDF==false or SDFRate.isSDFRate(f.sdfInput), "Missing SDF rate for fn "..f.kind) res.sdfInput, res.sdfOutput = f.sdfInput, f.sdfOutput err( type(f.delay)=="number","Module is missing delay? ",f) err(f.delay==math.floor(f.delay),"delay is fractional ?!, "..f.kind) if f.RVDelay~=nil then res.delay = f.RVDelay + f.delay else --res.delay = math.max(1, f.delay) res.delay = f.delay end err(type(f.stateful)=="boolean", "Missing stateful annotation, "..f.kind) res.stateful = f.stateful --f.stateful valid bit shift register is stateful res.requires = {} for inst,fnmap in pairs(f.requires) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.requires,{inst,fnname},1) end end res.provides = {} for inst,fnmap in pairs(f.provides) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.provides,{inst,fnname},1) end end if terralib~=nil then res.terraModule = MT.liftHandshake(res,f,f.delay) end function res.makeSystolic() assert( S.isModule(f.systolicModule) ) local passthrough = {} if f.stateful then passthrough={"reset"} end return liftHandshakeSystolic( f.systolicModule, {"process"},passthrough,{true},{f.stateful or f.delay>0},f.stateful ) end return rigel.newFunction(res) end) -- takes an image of size A[W,H] to size A[W+L+R,H+B+Top]. Fills the new pixels with value 'Value' modules.pad = memoize(function( A, W, H, L, R, B, Top, Value ) err( types.isType(A), "A must be a type") err( A~=nil, "pad A==nil" ) err( W~=nil, "pad W==nil" ) err( H~=nil, "pad H==nil" ) err( L~=nil, "pad L==nil" ) err( R~=nil, "pad R==nil" ) err( B~=nil, "pad B==nil" ) err( Top~=nil, "pad Top==nil" ) err( Value~=nil, "pad Value==nil" ) J.map({W=W,H=H,L=L,R=R,B=B,Top=Top},function(n,k) err(type(n)=="number","pad expected number for argument "..k.." but is "..tostring(n)); err(n==math.floor(n),"pad non-integer argument "..k..":"..n); err(n>=0,"n<0") end) A:checkLuaValue(Value) local res = {kind="pad", type=A, L=L, R=R, B=B, Top=Top, value=Value, width=W, height=H} res.inputType = types.array2d(A,W,H) res.outputType = types.array2d(A,W+L+R,H+B+Top) res.stateful = false res.sdfInput, res.sdfOutput = SDF{1,1}, SDF{1,1} res.delay=0 res.name = "Pad_"..tostring(A):gsub('%W','_').."_W"..W.."_H"..H.."_L"..L.."_R"..R.."_B"..B.."_Top"..Top.."_Value"..tostring(Value) -------- if terralib~=nil then res.terraModule = MT.pad( res, A, W, H, L, R, B, Top, Value ) end function res.makeSystolic() err(false, "NYI - pad modules systolic version") end return rigel.newFunction(res) end) -- map f:RV(scheduleType)->RV(scheduleType) -- over an RV(scheduleType)[W,H] array modules.mapOverInterfaces = memoize(function( f, W_orig, H_orig, X ) err( rigel.isFunction(f), "first argument to mapOverInterfaces must be Rigel module, but is ",f ) err( f.inputType:isRV(), "mapOverInterfaces: fn input must be RV, but is: ",f.inputType ) err( f.outputType:isRV(), "mapOverInterfaces: fn output must be RV, but is: ",f.outputType ) local W = Uniform(W_orig):toNumber() local H = Uniform(H_orig):toNumber() local G = require "generators.core" return G.Function{ "MapOverInterfaces_"..f.name.."_"..tostring(W_orig).."_"..tostring(H_orig), types.Array2d( f.inputType, W_orig, H_orig ), function(inp) local outt = {} for h=0,H-1 do for w=0,W-1 do table.insert(outt, f(rigel.selectStream( "str"..tostring(w).."_"..tostring(h), inp, w, h )) ) end end return rigel.concatArray2d( "moiout", outt, W, H ) end} end) -- f : ( A, B, ...) -> C (darkroom function) -- map : ( f, A[n], B[n], ...) -> C[n] -- allowStateful: allow us to make stateful modules (use this more like 'duplicate') modules.map = memoize(function( f, W_orig, H_orig, allowStateful, X ) err( rigel.isFunction(f), "first argument to map must be Rigel module, but is ",f ) assert(allowStateful==nil or type(allowStateful)=="boolean") local W = Uniform(W_orig) --err( Uniform(W)=="number", "width must be number") err( X==nil, "map: too many arguments" ) if H_orig==nil then return modules.map(f,W,1,allowStateful) end local H = Uniform(H_orig) --err( type(H)=="number", "map: H must be number" ) err( f.inputType:isrv(), "map: error, mapping a module with a non-rv input type? name:",f.name," ",f.inputType," W:",W_orig," H:",H_orig) err( f.outputType==types.Interface() or f.outputType:isrv(), "map: error, mapping a module with a non-rv output type? name:",f.name," ",f.outputType) err( f.inputType:deInterface():isData(), "map: error, map can only map a fully parallel function, but is: name:",f.name," inputType:",f.inputType) err( f.outputType:deInterface():isData(), "map: error, map can only map a fully parallel function, but is: name:",f.name," outputType:",f.outputType) W,H = W:toNumber(), H:toNumber() err( W*H==1 or f.stateful==false or allowStateful==true,"map: mapping a stateful function ("..f.name.."), which will probably not work correctly. (may execute out of order) W="..tostring(W)..",H="..tostring(H)," allowStateful=",tostring(allowStateful) ) local res if (W*H)%2==0 then -- special case: this is a power of 2, so we can easily split it, to save compile time -- (produces log(n) sized code instead of linear) local C = require "generators.examplescommon" local I = rigel.input( types.rv(types.Par(types.array2d( f.inputType:deInterface(), W, H ))) ) local ic = rigel.apply( "cc", C.cast( types.array2d( f.inputType:deInterface(), W, H ), types.array2d( f.inputType:deInterface(), W*H ) ), I) local ica = rigel.apply("ica", C.slice(types.array2d( f.inputType:deInterface(), W*H ),0,(W*H)/2-1,0,0), ic) local a = rigel.apply("a", modules.map(f,(W*H)/2,1,allowStateful), ica) local icb = rigel.apply("icb", C.slice(types.array2d( f.inputType:deInterface(), W*H ),(W*H)/2,(W*H)-1,0,0), ic) local b = rigel.apply("b", modules.map(f,(W*H)/2,1,allowStateful), icb) local out = rigel.concat("conc", {a,b}) --local T = types.array2d( f.outputType, (W*H)/2 ) out = rigel.apply( "cflat", C.flatten2( f.outputType:deInterface(), W*H ), out) out = rigel.apply( "cflatar", C.cast( types.array2d( f.outputType:deInterface(), W*H ), types.array2d( f.outputType:deInterface(), W,H ) ), out) res = modules.lambda("map_pow2_"..f.name.."_W"..tostring(W_orig).."_H"..tostring(H_orig).."_logn", I, out) else res = { kind="map", fn = f, W=W, H=H } res.inputType = types.array2d( f.inputType:deInterface(), W, H ) res.outputType = types.Interface() if f.outputType~=types.Interface() then res.outputType = types.array2d( f.outputType:deInterface(), W, H ) end err( type(f.stateful)=="boolean", "Missing stateful annotation ",f) res.stateful = f.stateful res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay = f.delay res.name = sanitize("map_"..f.name.."_W"..tostring(W_orig).."_H"..tostring(H_orig)) res.requires = {} for inst,fnmap in pairs(f.requires) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.requires,{inst,fnname},1) end end res.provides = {} for inst,fnmap in pairs(f.provides) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.provides,{inst,fnname},1) end end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local inp = S.parameter("process_input", res.inputType:deInterface() ) local out = {} local resetPipelines={} for y=0,H-1 do for x=0,W-1 do local inst = systolicModule:add(f.systolicModule:instantiate("inner"..x.."_"..y)) table.insert( out, inst:process( S.index( inp, x, y ) ) ) if f.stateful then table.insert( resetPipelines, inst:reset() ) -- no reset for pure functions end end end local CE if f.systolicModule.functions.process.CE~=nil then CE = S.CE("process_CE") end local finalOutput local pipelines finalOutput = S.cast( S.tuple( out ), res.outputType:deInterface() ) systolicModule:addFunction( S.lambda("process", inp, finalOutput, "process_output", pipelines, nil, CE ) ) if f.stateful then systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", resetPipelines, S.parameter("reset",types.bool()) ) ) end return systolicModule end res = rigel.newFunction(res) end if terralib~=nil then res.terraModule = MT.map(res,f,W,H) end return res end) -- lift a fn:DataType->DataType to a fn:DataType[V;S}->fn:DataType[V;S} -- basically the same as regular map, but for parseq -- scalar: is fn a scalar type? modules.mapParSeq = memoize(function( fn, Vw_orig, Vh_orig, W_orig, H_orig, allowStateful, X ) err( rigel.isPlainFunction(fn), "mapParSeq: first argument to map must be a plain Rigel function, but is ",fn ) err( X==nil, "mapParSeq: too many arguments" ) local Vw,Vh,W,H = Uniform(Vw_orig), Uniform(Vh_orig), Uniform(W_orig), Uniform(H_orig) local res local G = require "generators.core" local C = require "generators.examplescommon" if (fn.inputType:isRV() or fn.outputType:isRV()) and Vw:toNumber()==1 and Vh:toNumber()==1 then assert( fn.inputType:deInterface():isData() ) local ty = fn.inputType:extractData() res = G.Function{"MapParSeq_fn"..fn.name.."_Vw"..tostring(Vw_orig).."_Vh"..tostring(Vh_orig).."_W"..tostring(W_orig).."_H"..tostring(H_orig), types.RV(types.Array2d(ty,1,1)), fn.sdfInput, function(inp) return fn(G.Index{0}(inp)) end} assert( rigel.isPlainFunction(res) ) -- hackity hack if fn.inputType~=types.Interface() then err( res.inputType:extractData():isArray(), "mapParSeq: internal error, function input type should be an array? but was: ",res.inputType) res.inputType = fn.inputType:replaceVar("over",types.ParSeq(res.inputType:extractData(),W_orig,H_orig)) end if fn.outputType~=types.Interface() then -- fix: technically, we want this to return a parseq, I guess? But this also works... res.outputType = types.RV( types.Seq(fn.outputType.over,W_orig,H_orig) ) end elseif fn.inputType:isRV() or fn.outputType:isRV() then assert( fn.inputType:deInterface():isData() ) local ty = fn.inputType:extractData() local fnMapped fnMapped = C.MapRV( fn, Vw_orig, Vh_orig, allowStateful ) res = G.Function{"MapParSeq_fn"..fn.name.."_Vw"..tostring(Vw_orig).."_Vh"..tostring(Vh_orig).."_W"..tostring(W_orig).."_H"..tostring(H_orig), types.RV(types.Array2d(ty,Vw_orig,Vh_orig)), fnMapped.sdfInput, function(inp) return fnMapped(inp) end} assert( rigel.isPlainFunction(res) ) -- hackity hack if fn.inputType~=types.Interface() then err( res.inputType:extractData():isArray(), "mapParSeq: internal error, function input type should be an array? but was: ",res.inputType) local newType = fn.inputType:replaceVar("over",types.ParSeq(res.inputType:extractData(),W_orig,H_orig)) J.err( newType:lower()== res.inputType:lower(), "type hack error ",newType,res.inputType ) res.inputType = newType end if fn.outputType~=types.Interface() then -- fix: technically, we want this to return a parseq, I guess? But this also works... local newType = fn.outputType:replaceVar("over",types.ParSeq(res.outputType:extractData(),W_orig,H_orig)) J.err(newType:lower()== res.outputType:lower(), "type hack error ",newType,res.outputType) res.outputType = newType end else err( fn.inputType:isrv(),"mapParSeq: input must be rv, but is: ",fn.inputType ) err( fn.outputType==types.Interface() or fn.outputType:isrv(),"mapParSeq: output must be rv, but is: ",fn.outputType ) local fnMapped fnMapped = modules.map( fn, Vw, Vh, allowStateful ) res = G.Function{"MapParSeq_fn"..fn.name.."_Vw"..tostring(Vw_orig).."_Vh"..tostring(Vh_orig).."_W"..tostring(W_orig).."_H"..tostring(H_orig), fnMapped.inputType,SDF{1,1},function(inp) return fnMapped(inp) end} assert( rigel.isPlainFunction(res) ) -- hackity hack if fn.inputType~=types.Interface() then err( res.inputType:extractData():isArray(), "mapParSeq: internal error, function input type should be an array? but was: ",res.inputType) res.inputType = fn.inputType:replaceVar("over",types.ParSeq(res.inputType:extractData(),W_orig,H_orig)) end if fn.outputType~=types.Interface() then err( res.outputType:extractData():isArray(), "mapParSeq: internal error, function output type should be an array? but was: ",res.outputType) res.outputType = fn.outputType:replaceVar("over",types.ParSeq(res.outputType:extractData(),W_orig,H_orig)) end end return res end) -- take a fn:T1->T2 and map over a Seq, ie to f:T1{w,h}->T2{w,h} -- this is basically a trivial conversion modules.mapSeq = memoize(function( fn, W_orig, H_orig, X ) err( rigel.isPlainFunction(fn), "mapSeq: first argument to map must be Rigel module, but is ",fn ) err( fn.inputType.kind=="Interface", "mapSeq: fn input should be interface, but is: ",fn.inputType ) err( fn.outputType.kind=="Interface", "mapSeq: fn '",fn.name,"' output should be interface, but is: ",fn.outputType ) err( type(W_orig)=="number" or Uniform.isUniform(W_orig),"mapSeq: W must be number or uniform") err( type(H_orig)=="number" or Uniform.isUniform(H_orig),"mapSeq: H must be number or uniform") local G = require "generators.core" local res = G.Function{"MapSeq_fn"..fn.name.."_W"..tostring(W_orig).."_H"..tostring(H_orig),fn.inputType,fn.sdfInput,function(inp) return fn(inp) end} assert( rigel.isPlainFunction(res) ) -- hackity hack if fn.inputType~=types.Interface() then local inputType = fn.inputType:replaceVar("over",types.Seq(fn.inputType:deInterface(),W_orig,H_orig)) assert(res.inputType:lower()==inputType:lower()) res.inputType = inputType end if fn.outputType~=types.Interface() then local outputType = fn.outputType:replaceVar("over",types.Seq(fn.outputType:deInterface(),W_orig,H_orig)) -- print("MAPSEQ",res.outputType,outputType) -- print("MAPSEQ_low",res.outputType:lower(),outputType:lower()) assert(res.outputType:lower()==outputType:lower()) res.outputType = outputType end return res end) -- take a fn:T1->T2 and map over a Seq, ie to f:T1{w,h}->T2{w,h} -- this is basically a trivial conversion modules.mapVarSeq = memoize(function( fn, W_orig, H_orig, X ) err( rigel.isFunction(fn), "mapVarSeq: first argument to map must be Rigel module, but is ",fn ) local G = require "generators.core" local res = G.Function{"MapVarSeq_fn"..fn.name.."_W"..tostring(W_orig).."_H"..tostring(H_orig),fn.inputType,SDF{1,1},function(inp) return fn(inp) end} assert(res.over==nil) res.over = fn assert( rigel.isFunction(res) ) -- hackity hack if fn.inputType~=types.Interface() then local NT = fn.inputType:replaceVar("over",types.Array2d(res.inputType.over,W_orig,H_orig,0,0,true)) assert( NT:lower()==res.inputType:lower() ) res.inputType = NT end if fn.outputType~=types.Interface() then local NT = fn.outputType:replaceVar("over",types.Array2d(res.outputType.over,W_orig,H_orig,0,0,true)) assert( NT:lower()==res.outputType:lower() ) res.outputType = NT end return res end) -- convert S interface to rv modules.Storv = memoize(function( fn, X ) assert(X==nil) err( rigel.isFunction(fn), "Storv: first argument to map must be Rigel module, but is ",fn ) err( fn.inputType==types.Interface() or fn.inputType:isS(), "Storv: input type must be Inil or S") err( fn.outputType==types.Interface() or fn.outputType:isS(), "Storv: output type must be Inil or S") local res = { kind="Storv", delay=fn.delay, sdfInput=fn.sdfInput, sdfOutput=fn.sdfOutput, stateful=fn.stateful } res.name = sanitize("Storv_"..fn.name) res.requires = {} for inst,fnmap in pairs(fn.requires) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.requires,{inst,fnname},1) end end res.provides = {} for inst,fnmap in pairs(fn.provides) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.provides,{inst,fnname},1) end end res.instanceMap = {} res.instanceMap[fn:instantiate("fn")] = 1 -- hackity hack if fn.inputType==types.Interface() then if fn.outputType:deInterface():isData() then res.inputType = types.rv(types.Par(types.Trigger)) else print(fn.outputType) assert(false) end else assert(false) res.inputType = types.rv(fn.inputType.over) end if fn.outputType==types.Interface() then if fn.inputType.over:is("Par") then assert(false) res.outputType = types.rv(types.Par(types.Trigger)) else assert(false) end else res.outputType = types.rv(fn.outputType.over) end res = rigel.newFunction(res) function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) s:verilog(res:vHeader()..res:vInstances()..[=[ assign process_output = fn_process_output; endmodule ]=]) return s end if terralib~=nil then res.terraModule = MT.Storv( res, fn ) end return res end) -- it's hard to know how any given module should be flatmapped, so just have user explicitly say what they want -- take f:Par(T1[Vw1,Vh1])->Par(T2[Vw2,Vh2]) to T1[Vw1,Vh1;W1,H1}->T2[Vw2,Vh2;W2,H2} -- if Vw==Vh==W==H==0, just leave that dimension alone (scalar output) -- if Vw==Vh==0, have a Seq output, instead of ParSeq modules.flatmap = memoize(function( fn, Vw1, Vh1, W1_orig, H1_orig, Vw2, Vh2, W2_orig, H2_orig, X ) err( rigel.isFunction(fn), "flatmapParSeq: first argument must be Rigel function, but is ",fn ) err( (Vw1==0 and Vh1==0) or fn.inputType:deInterface():isData(), "flatmapParSeq: fn input must Par, but input type is: "..tostring(fn.inputType) ) err( (Vw1==0 and Vh1==0) or fn.inputType:extractData():isArray(), "flatmapParSeq: fn input must be array, but input type is: "..tostring(fn.inputType) ) err( (Vw2==0 and Vh2==0) or fn.outputType:deInterface():isData(), "flatmapParSeq: fn output must be Par, but output type is: "..tostring(fn.outputType) ) err( (Vw2==0 and Vh2==0) or fn.outputType:extractData():isArray(), "flatmapParSeq: fn output must be array, but output type is: "..tostring(fn.outputType) ) local G = require "generators.core" local res = G.Function{"flatmapParSeq_fn"..fn.name.."_Vw1"..tostring(Vw1).."_Vh1"..tostring(Vh1).."_W1"..tostring(W1_orig).."_H1"..tostring(H1_orig),fn.inputType,SDF{1,1},function(inp) return fn(inp) end} assert( rigel.isFunction(res) ) -- hackity hack if Vw1>0 or Vh1>0 then local newinp = fn.inputType:replaceVar("over",types.ParSeq( res.inputType:extractData(), W1_orig, H1_orig )) assert( res.inputType:lower()==newinp:lower() ) res.inputType = newinp elseif W1_orig>0 or H1_orig>0 then local newinp = fn.inputType:replaceVar("over",types.Seq(types.Par( res.inputType:extractData()) ,W1_orig, H1_orig )) assert( res.inputType:lower()==newinp:lower() ) res.inputType = newinp end if Vw2>0 or Vh2>0 then local newout = fn.outputType:replaceVar("over",types.ParSeq( res.outputType:extractData(), W2_orig, H2_orig )) assert( res.outputType:lower() == newout:lower() ) res.outputType = newout elseif W2_orig>0 or H2_orig>0 then local newout = fn.outputType:replaceVar("over",types.Seq(types.Par( res.outputType:extractData() ), W2_orig, H2_orig )) assert( res.outputType:lower() == newout:lower() ) res.outputType = newout end return res end) -- type {A,bool}->A -- rate: {n,d} format frac. If coerce=true, 1/rate must be integer. -- if rate={1,16}, filterSeq will return W*H/16 pixels modules.filterSeq = memoize(function( A, W_orig, H, rate, fifoSize, coerce, framed, annotateBurstiness, X ) assert(types.isType(A)) local W = Uniform(W_orig):toNumber() --err(type(W)=="number", "filterSeq: W must be number, but is: ",W) err(type(H)=="number", "filterSeq: H must be number, but is: ",H) err( SDFRate.isFrac(rate), "filterSeq: rate must be {n,d} format fraction" ) err(type(fifoSize)=="number", "fifoSize must be number") if framed==nil then framed=false end err( type(framed)=="boolean", "filterSeq: framed must be bool" ) err(X==nil,"filterSeq: too many args") if coerce==nil then coerce=true end local res = { kind="filterSeq", A=A } -- this has type basic->V (decimate) if framed then res.inputType = types.rv(types.Seq(types.Par(types.tuple{A,types.bool()}),W_orig,H)) res.outputType = types.rvV(types.VarSeq(types.Par(A),W_orig,H)) else res.inputType = types.rv(types.Par(types.tuple{A,types.bool()})) res.outputType = types.rvV(types.Par(A)) end res.delay = 0 res.stateful = true res.sdfInput = SDF{1,1} res.sdfOutput = SDF{rate} res.name = sanitize("FilterSeq_"..tostring(A)) if annotateBurstiness~=false then res.outputBurstiness = fifoSize end if coerce then local outTokens = ((W*H)*rate[1])/rate[2] err(outTokens==math.ceil(outTokens),"FilterSeq error: number of resulting tokens is non integer ("..tonumber(outTokens)..")") end if terralib~=nil then res.terraModule = MT.filterSeq( res, A, W,H, rate, fifoSize, coerce ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) -- hack: get broken systolic library to actually wire valid local phase = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIfWrap( types.uint(16), 42, 1 ) ):CE(true):setReset(0):setInit(0):instantiate("phase") ) local sinp = S.parameter("process_input", res.inputType:lower() ) local CE = S.CE("CE") local v = S.parameter("process_valid",types.bool()) if coerce then local invrate = rate[2]/rate[1] err(math.floor(invrate)==invrate,"filterSeq: in coerce mode, 1/rate must be integer but is "..tostring(invrate)) local outputCount = (W*H*rate[1])/rate[2] err(math.floor(outputCount)==outputCount,"filterSeq: in coerce mode, outputCount must be integer, but is "..tostring(outputCount)) local vstring = [[ module FilterSeqImpl(input wire CLK, input wire process_valid, input wire reset, input wire ce, input wire []]..tostring(res.inputType:lower():verilogBits()-1)..[[:0] inp, output wire []]..tostring(rigel.lower(res.outputType):verilogBits()-1)..[[:0] out); parameter INSTANCE_NAME="INST"; reg [31:0] phase; reg [31:0] cyclesSinceOutput; reg [31:0] currentFifoSize; reg [31:0] remainingInputs; reg [31:0] remainingOutputs; wire []]..tostring(res.inputType:lower():verilogBits()-2)..[[:0] inpData; assign inpData = inp[]]..tostring(res.inputType:lower():verilogBits()-2)..[[:0]; wire filterCond; assign filterCond = inp[]]..tostring(res.inputType:lower():verilogBits()-1)..[[]; wire underflow; assign underflow = (currentFifoSize==0 && cyclesSinceOutput==]]..tostring(invrate)..[[); wire fifoHasSpace; assign fifoHasSpace = currentFifoSize<]]..tostring(fifoSize)..[[; wire outaTime; assign outaTime = remainingInputs < (remainingOutputs*]]..tostring(invrate)..[[); wire validOut; assign validOut = (((filterCond || underflow) && fifoHasSpace) || outaTime); assign out = {validOut,inpData}; always @ (posedge CLK) begin if (reset) begin phase <= 0; cyclesSinceOutput <= 0; currentFifoSize <= 0; remainingInputs <= ]]..tostring(W*H)..[[; remainingOutputs <= ]]..tostring(outputCount)..[[; end else if (ce && process_valid) begin currentFifoSize <= (validOut && (phase<]]..tostring(invrate-1)..[[))?(currentFifoSize+1):( (validOut==1'b0 && phase==]]..tostring(invrate-1)..[[ && currentFifoSize>0)? (currentFifoSize-1) : (currentFifoSize) ); cyclesSinceOutput <= (validOut)?0:cyclesSinceOutput+1; remainingOutputs <= validOut?( (remainingOutputs==0)?]]..tostring(outputCount)..[[:(remainingOutputs-1) ):remainingOutputs; remainingInputs <= (remainingInputs==0)?]]..tostring(W*H)..[[:(remainingInputs-1); phase <= (phase==]]..tostring(invrate)..[[)?0:(phase+1); end end ]] if DARKROOM_VERBOSE then vstring = vstring..[[always @(posedge CLK) begin $display("FILTER reset:%d process_valid:%d filterCond:%d validOut:%d phase:%d cyclesSinceOutput:%d currentFifoSize:%d remainingInputs:%d remainingOutputs:%d underflow:%d fifoHasSpace:%d outaTime:%d", reset, process_valid, filterCond, validOut, phase, cyclesSinceOutput, currentFifoSize, remainingInputs, remainingOutputs, underflow, fifoHasSpace, outaTime); end ]] end vstring = vstring..[[endmodule ]] local fns = {} local inp = S.parameter("inp",res.inputType:lower()) local datat = rigel.extractData(res.outputType) local datav = datat:fakeValue() fns.process = S.lambda("process",inp,S.cast(S.tuple{S.constant(datav,datat),S.constant(true,types.bool())}, rigel.lower(res.outputType)), "out",nil,S.parameter("process_valid",types.bool()),S.CE("ce")) fns.reset = S.lambda( "reset", S.parameter("resetinp",types.null()), S.null(), "resetout",nil,S.parameter("reset",types.bool())) local FilterSeqImpl = systolic.module.new("FilterSeqImpl", fns, {}, true,nil, vstring,{process=0,reset=0}) local inner = systolicModule:add(FilterSeqImpl:instantiate("filterSeqImplInner")) systolicModule:addFunction( S.lambda("process", sinp, inner:process(sinp,v), "process_output", {phase:setBy(S.constant(true,types.bool()))}, v, CE ) ) local resetValid = S.parameter("reset",types.bool()) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {phase:reset(),inner:reset(nil,resetValid)},resetValid) ) else systolicModule:addFunction( S.lambda("process", sinp, sinp, "process_output", {phase:setBy(S.constant(true,types.bool()))}, v, CE ) ) local resetValid = S.parameter("reset",types.bool()) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {phase:reset()},resetValid) ) end return systolicModule end return rigel.newFunction(res) end) -- takes in a vectorized sparse array: {A,bool}[N], and returns it as sparse A array -- We simplify this module by only writing out at most 1 token per cycle. -- So, our output rate really needs to be <1/N, or else we will not be able to keep up with throughput -- restrictions: input array of valids must be sorted (valids come first) -- 'rate' is % of tokens that will survive the filter. (ie 1/2 means half elements will be filtered) modules.filterSeqPar = memoize(function( A, N, rate, framed, framedW, framedH, X ) err( types.isType(A), "filterSeqPar: input type must be type" ) err( type(N)=="number", "filterSeqPar: N must be number, but is: "..tostring(N) ) err( N>0,"filterSeqPar: N must be > 0") err( SDF.isSDF(rate), "filterSeqPar: rate must be SDF rate" ) assert(X==nil) if framed==nil then framed=false end assert(type(framed)=="boolean") local res = {kind="filterSeqPar"} if framed then res.inputType = types.rv(types.ParSeq(types.array2d( types.tuple{A,types.bool()}, N ),framedW,framedH) ) res.outputType = types.rRvV(types.VarSeq(types.Par(A),framedW,framedH)) else res.inputType = types.rv(types.Par(types.array2d( types.tuple{A,types.bool()}, N )) ) res.outputType = types.rRvV( types.Par(A) ) end res.sdfInput = SDF{1,1} -- we have N elements coming in, but we only write out 1 per cycle, so include that factor res.sdfOutput = SDF{rate[1][1]*N,rate[1][2]} res.stateful = true res.delay = 0 res.name = J.sanitize("FilterSeqPar_"..tostring(A).."_N"..tostring(N).."_rate"..tostring(rate)) local fakeV = {A:fakeValue(),false} local fakeVA = J.broadcast(fakeV,N) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local buffer = systolicModule:add( S.module.reg( res.inputType:extractData(), true, fakeVA, true, fakeVA ):instantiate("buffer") ) --local readyForMore = S.__or(readyForMore0, S.__and(readyForMore1,readyForMore2)):disablePipelining() local readyForMore = S.eq( S.index(S.index(buffer:get(),0),1), S.constant(false,types.bool()) ) local sinp = S.parameter( "inp", res.inputType:lower() ) -- shift phase local sptup = {} for i=1,N-1 do table.insert( sptup, S.index(buffer:get(),i) ) end table.insert( sptup, S.constant(fakeV, types.tuple{A,types.bool()} ) ) local shiftPhase = S.tuple(sptup) shiftPhase = S.cast(shiftPhase, types.array2d(types.tuple{A,types.bool()},N) ) ---------- local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.index( buffer:get(), 0 ), "process_output", {buffer:set(S.select(readyForMore,sinp,shiftPhase))}, nil, CE) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), readyForMore, "ready", {} ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {buffer:reset()},S.parameter("reset",types.bool())) ) return systolicModule end res.makeTerra = function() return MT.filterSeqPar(res,A,N) end return modules.waitOnInput( rigel.newFunction(res) ) end) -- takes A[W,H] to A[W,H/scale] -- lines where ycoord%scale==0 are kept -- basic -> V modules.downsampleYSeq = memoize(function( A, W_orig, H_orig, T, scale, X ) err( types.isType(A), "downsampleYSeq: type must be rigel type") err( Uniform(W_orig):isNumber(), "downsampleYSeq: W must be number" ) err( Uniform(H_orig):isNumber(), "downsampleYSeq: H must be number" ) err( type(T)=="number", "downsampleYSeq: T must be number" ) err( type(scale)=="number", "downsampleYSeq: scale must be number" ) err( scale>=1, "downsampleYSeq: scale must be >=1" ) err( T==0 or (Uniform(W_orig)%Uniform(T)):eq(0):assertAlwaysTrue(), "downsampleYSeq, W%T~=0") err( J.isPowerOf2(scale), "scale must be power of 2") err( X==nil, "downsampleYSeq: too many arguments" ) local sbits = math.log(scale)/math.log(2) local inputType = A if T>0 then inputType = types.array2d(A,T) end local outputType = types.lower(types.rvV(types.Par(inputType))) local xyType = types.array2d(types.tuple{types.uint(16),types.uint(16)},math.max(T,1)) local innerInputType = types.tuple{xyType, inputType} local modname = J.sanitize("DownsampleYSeq_W"..tostring(W_orig).."_H"..tostring(H_orig).."_scale"..tostring(scale).."_"..tostring(A).."_T"..tostring(T)) local f = modules.lift( modname, innerInputType, outputType, 0, function(sinp) local sdata = S.index(sinp,1) local sy = S.index(S.index(S.index(sinp,0),0),1) local svalid = S.eq(S.cast(S.bitSlice(sy,0,sbits-1),types.uint(sbits)),S.constant(0,types.uint(sbits))) return S.tuple{sdata,svalid} end, function() return MT.downsampleYSeqFn(innerInputType,outputType,scale) end, nil, {{1,scale}}) local res = modules.liftXYSeq( modname, "rigel.downsampleYSeq", f, W_orig, H_orig, math.max(1,T) ) res.outputType = types.rvV(types.Par(inputType)) local W,H = Uniform(W_orig):toNumber(), Uniform(H_orig):toNumber() local function downYSim() for y=0,H-1 do for x=0,W-1,math.max(T,1) do if y%scale==0 then coroutine.yield(true) else coroutine.yield(false) end end end end res.delay = J.sel(T>1,1,0) res.RVDelay, res.outputBurstiness = J.simulateFIFO( downYSim, res.sdfOutput, modname, false ) return res end) -- takes A[W,H] to A[W/scale,H] -- lines where xcoord%scale==0 are kept -- basic -> V -- -- This takes A[T] to A[T/scale], except in the case where scale>T. Then it goes from A[T] to A[1]. If you want to go from A[T] to A[T], use changeRate. modules.downsampleXSeq = memoize(function( A, W_orig, H_orig, T, scale, X ) err( types.isType(A), "downsampleXSeq: type must be rigel type" ) err( A:isData(),"downsampleXSeq: input type must be data type") --err( type(W)=="number", "downsampleXSeq: W must be number" ) --err( type(H)=="number", "downsampleXSeq: H must be number" ) err( type(T)=="number", "downsampleXSeq: T must be number" ) err( type(scale)=="number", "downsampleXSeq: scale must be number" ) err( scale>=1, "downsampleXSeq: scale must be >=1 ") err( T==0 or (Uniform(W_orig)%Uniform(T)):eq(0):assertAlwaysTrue(), "downsampleXSeq, W%T~=0") err( J.isPowerOf2(scale), "NYI - scale must be power of 2") err( X==nil, "downsampleXSeq: too many arguments" ) err( (Uniform(W_orig)%Uniform(scale)):eq(0):assertAlwaysTrue(),"downsampleXSeq: NYI - scale ("..tostring(scale)..") does not divide W ("..tostring(W_orig)..")") local W,H = Uniform(W_orig):toNumber(), Uniform(H_orig):toNumber() local sbits = math.log(scale)/math.log(2) local outputT if scale>T then outputT = J.sel(T==0,0,1) elseif T%scale==0 then outputT = T/scale else err(false,"T%scale~=0 and scale<T") end local inputType = A if T>0 then inputType = types.array2d(A,T) end local outputType = types.lower(types.rvV(A)) if outputT>0 then outputType = types.lower(types.rvV(types.Par(types.array2d(A,outputT)))) end local xyType = types.array2d(types.tuple{types.uint(16),types.uint(16)},math.max(T,1)) local innerInputType = types.tuple{xyType, inputType} local tfn, sdfOverride local modname = J.sanitize("DownsampleXSeq_W"..tostring(W_orig).."_H"..tostring(H_orig).."_"..tostring(A).."_T"..tostring(T).."_scale"..tostring(scale)) local delay, RVDelay, outputBurstiness if scale>T then -- A[T] to A[1] -- tricky: each token contains multiple pixels, any of of which can be valid assert(scale%math.max(T,1)==0) sdfOverride = {{1,scale/math.max(T,1)}} if terralib~=nil then tfn = MT.downsampleXSeqFn( innerInputType, outputType, scale, T, outputT ) end local function downXSim() for y=0,H-1 do for x=0,W-1,math.max(T,1) do if x%scale==0 then coroutine.yield(true) else coroutine.yield(false) end end end end delay = J.sel(T>1,1,0) RVDelay, outputBurstiness = J.simulateFIFO( downXSim, SDF(sdfOverride), modname, false ) else -- scale <= T... for every token, we output 1 token sdfOverride = {{1,1}} if terralib~=nil then tfn = MT.downsampleXSeqFnShort(innerInputType,outputType,scale,outputT) end delay = 1 outputBurstiness = 0 end local f = modules.lift( modname, innerInputType, outputType, 0, function(sinp) local svalid, sdata if scale>T then -- A[T] to A[1] local sx = S.index(S.index(S.index(sinp,0),0),0) svalid = S.eq(S.cast(S.bitSlice(sx,0,sbits-1),types.uint(sbits)),S.constant(0,types.uint(sbits))) sdata = S.index(sinp,1) if T>0 then sdata = S.index(sdata,0) sdata = S.cast(S.tuple{sdata},types.array2d(sdata.type,1)) end else svalid = S.constant(true,types.bool()) local datavar = S.index(sinp,1) sdata = J.map(J.range(0,outputT-1), function(i) return S.index(datavar, i*scale) end) sdata = S.cast(S.tuple(sdata), types.array2d(A,outputT)) end local res = S.tuple{sdata,svalid} return res end, function() return tfn end, nil, sdfOverride) local res = modules.liftXYSeq( modname, "rigel.downsampleXSeq", f, W_orig, H_orig, math.max(T,1) ) -- hack local newType = types.rvV(A) if outputT>0 then newType = types.rvV(types.array2d(A,outputT)) end assert(res.outputType:lower()==newType:lower()) res.outputType = newType res.delay, res.outputBurstiness = delay, outputBurstiness return res end) -- takes an image of size A[W,H] to size A[W/scaleX,H/scaleY]. Fills the new pixels with value 'Value' modules.downsample = memoize(function( A, W, H, scaleX, scaleY, X ) err( types.isType(A), "A must be a type") err( A~=nil, "downsample A==nil" ) err( W~=nil, "downsample W==nil" ) err( H~=nil, "downsample H==nil" ) err( scaleX~=nil, "downsample scaleX==nil" ) err( scaleY~=nil, "downsample scaleY==nil" ) err( X==nil, "downsample: too many arguments" ) J.map({W=W,H=H,scaleX=scaleX,scaleY=scaleY},function(n,k) err(type(n)=="number","downsample expected number for argument "..k.." but is "..tostring(n)); err(n==math.floor(n),"downsample non-integer argument "..k..":"..n); err(n>=0,"n<0") end) err( W%scaleX==0, "downsample: scaleX does not divide width evenly") err( H%scaleY==0, "downsample: scaleY does not divide height evenly") local res = {kind="downsample", type=A, width=W, height=H, scaleX=scaleX, scaleY=scaleY} res.inputType = types.array2d( A, W, H ) res.outputType = types.array2d( A, W/scaleX, H/scaleY ) res.stateful = false res.sdfInput, res.sdfOutput = SDF{1,1}, SDF{1,1} res.delay=0 res.name = "Downsample_"..tostring(A):gsub('%W','_').."_W"..W.."_H"..H.."_scaleX"..scaleX.."_scaleY"..scaleY -------- if terralib~=nil then res.terraModule = MT.downsample( res, A, W, H, scaleX, scaleY ) end function res.makeSystolic() err(false, "NYI - downsample modules systolic version") end return rigel.newFunction(res) end) -- takes an image of size A[W,H] to size A[W*scaleX,H*scaleY]. Fills the new pixels with value 'Value' modules.upsample = memoize(function( A, W, H, scaleX, scaleY, X ) err( types.isType(A), "A must be a type") err( A~=nil, "upsample A==nil" ) err( W~=nil, "upsample W==nil" ) err( H~=nil, "upsample H==nil" ) err( scaleX~=nil, "upsample scaleX==nil" ) err( scaleY~=nil, "upsample scaleY==nil" ) err( X==nil, "upsample: too many arguments" ) J.map({W=W,H=H,scaleX=scaleX,scaleY=scaleY},function(n,k) err(type(n)=="number","upsample expected number for argument "..k.." but is "..tostring(n)); err(n==math.floor(n),"upsample non-integer argument "..k..":"..n); err(n>=0,"n<0") end) local res = {kind="upsample", type=A, width=W, height=H, scaleX=scaleX, scaleY=scaleY} res.inputType = types.array2d( A, W, H ) res.outputType = types.array2d( A, W*scaleX, H*scaleY ) res.stateful = false res.sdfInput, res.sdfOutput = SDF{1,1}, SDF{1,1} res.delay=0 res.name = "Upsample_"..tostring(A):gsub('%W','_').."_W"..W.."_H"..H.."_scaleX"..scaleX.."_scaleY"..scaleY -------- if terralib~=nil then res.terraModule = MT.upsample( res, A, W, H, scaleX, scaleY ) end function res.makeSystolic() err(false, "NYI - upsample modules systolic version") end return rigel.newFunction(res) end) -- This is actually a pure function -- takes A[T] to A[T*scale] -- like this: [A[0],A[0],A[1],A[1],A[2],A[2],...] broadcastWide = memoize(function( A, T, scale ) local ITYPE, OTYPE = types.array2d(A,T), types.array2d(A,T*scale) assert(scale<100) return modules.lift( J.sanitize("broadcastWide_"..tostring(A).."_T"..tostring(T).."_scale"..tostring(scale)), ITYPE, OTYPE, 0, function(sinp) local out = {} for t=0,T-1 do for s=0,scale-1 do table.insert(out, S.index(sinp,t) ) end end return S.cast(S.tuple(out), OTYPE) end, function() return MT.broadcastWide(ITYPE,OTYPE,T,scale) end) end) -- this has type V->RV modules.upsampleXSeq = memoize(function( A, T, scale_orig, framed, X ) err( types.isType(A), "upsampleXSeq: first argument must be rigel type, but is: ",A) err( rigel.isBasic(A),"upsampleXSeq: type must be basic type, but is: ",A) err( type(T)=="number", "upsampleXSeq: vector width must be number") if framed==nil then framed=false end err( type(framed)=="boolean", "upsampleXSeq: framed must be bool" ) --err( type(scale)=="number","upsampleXSeq: scale must be number") local scale = Uniform(scale_orig) local COUNTER_BITS = 24 local COUNTER_MAX = math.pow(2,COUNTER_BITS)-1 err( scale:lt(COUNTER_MAX):assertAlwaysTrue(), "upsampleXSeq: NYI - scale>="..tostring(COUNTER_MAX)..". scale="..tostring(scale)) err( scale:gt(0):assertAlwaysTrue(),"upsampleXSeq: scale must be >0! but is: "..tostring(scale)) err(X==nil, "upsampleXSeq: too many arguments") if T==1 or T==0 then -- special case the EZ case of taking one value and writing it out N times local res = {kind="upsampleXSeq",sdfInput=SDF{1,scale}, sdfOutput=SDF{1,1}, stateful=true, A=A, T=T, scale=scale} if T==0 then res.inputType = types.rv(types.Par(A)) res.outputType = types.rRvV(types.Par(A)) else local ITYPE = types.array2d(A,T) res.inputType = types.rv(types.Par(ITYPE)) res.outputType = types.rRvV(types.Par(types.array2d(A,T))) end res.delay=0 res.name = verilogSanitize("UpsampleXSeq_"..tostring(A).."_T_"..tostring(T).."_scale_"..tostring(scale_orig)) if terralib~=nil then res.terraModule = MT.upsampleXSeq(res, A, T, scale, res.inputType:extractData() ) end ----------------- function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter( "inp", res.inputType:extractData() ) local sPhase = systolicModule:add( Ssugar.regByConstructor( types.uint(COUNTER_BITS), fpgamodules.sumwrap(types.uint(COUNTER_BITS),scale-1) ):CE(true):setReset(0):instantiate("phase") ) local reg if A~=types.Trigger then reg = systolicModule:add( S.module.reg( res.inputType:extractData(),true ):instantiate("buffer") ) end local reading = S.eq(sPhase:get(),S.constant(0,types.uint(COUNTER_BITS))):disablePipelining() local out if A==types.Trigger then out = S.constant(res.outputType:extractData():fakeValue(),res.outputType:extractData()) else out = S.select( reading, sinp, reg:get() ) end local pipelines = {} if A~=types.Trigger then table.insert(pipelines, reg:set( sinp, reading ) ) end table.insert( pipelines, sPhase:setBy( S.constant(1,types.uint(COUNTER_BITS)) ) ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.tuple{out,S.constant(true,types.bool())}, "process_output", pipelines, nil, CE) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), reading, "ready", {} ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {sPhase:reset()},S.parameter("reset",types.bool())) ) return systolicModule end local res = modules.liftHandshake(modules.waitOnInput( rigel.newFunction(res) )) if framed then res.outputType = types.RV(types.Seq(res.outputType:extractData(),scale_orig,1)) end return res else -- T>1 -- this takes T[V]->T[V] with rate (1/scale)->1 err( scale:isConst(), "upsampleXSeq: NYI - runtime configurable scale" ) local scaleV = scale:toNumber() if scaleV>T and scaleV%T==0 then -- codesize optimization local C = require "generators.examplescommon" return C.linearPipeline({modules.changeRate(A,1,T,0), modules.upsampleXSeq(A,0,scaleV/T), modules.makeHandshake(C.broadcast(A,T))}, "upsampleXSeq_"..J.verilogSanitize(tostring(A)).."_T"..tostring(T).."_scale"..tostring(scaleV)) else return modules.compose("upsampleXSeq_"..J.verilogSanitize(tostring(A)).."_T"..tostring(T).."_scale"..tostring(scaleV), modules.changeRate(A,1,T*scaleV,T), modules.makeHandshake(broadcastWide(A,T,scaleV))) end end end) -- V -> RV modules.upsampleYSeq = memoize(function( A, W, H, T, scale ) err( types.isType(A), "upsampleYSeq: type must be type") err( rigel.isBasic(A), "upsampleYSeq: type must be basic type") err( type(W)=="number", "upsampleYSeq: W must be number") err( type(H)=="number", "upsampleYSeq: H must be number") err( type(T)=="number", "upsampleYSeq: T must be number") err( type(scale)=="number", "upsampleYSeq: scale must be number") err( scale>1, "upsampleYSeq: scale must be > 1 ") err( (W/T)*scale<65536, "upsampleXSeq: NYI - (W/T)*scale>=65536") err( W%T==0,"W%T~=0") err( J.isPowerOf2(scale), "scale must be power of 2") err( J.isPowerOf2(W), "W must be power of 2") local res = {kind="upsampleYSeq", sdfInput=SDF{1,scale}, sdfOutput=SDF{1,1}, A=A, T=T, width=W, height=H, scale=scale} local ITYPE = types.array2d(A,T) res.inputType = types.rv(types.Par(ITYPE)) res.outputType = types.rRvV(types.Par(types.array2d(A,T))) res.delay = 1 res.stateful = true res.name = verilogSanitize("UpsampleYSeq_"..tostring(A).."_T_"..tostring(T).."_scale_"..tostring(scale).."_w_"..tostring(W).."_h_"..tostring(H)) if terralib~=nil then res.terraModule = MT.upsampleYSeq( res,A, W, H, T, scale, ITYPE ) end ----------------- function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter( "inp", ITYPE ) -- we currently don't have a way to make a posx counter and phase counter coherent relative to each other. So just use 1 counter for both. This restricts us to only do power of two however! local sPhase = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.sumwrap(types.uint(16),(W/T)*scale-1) ):setReset(0):CE(true):instantiate("xpos") ) local addrbits = math.log(W/T)/math.log(2) assert(addrbits==math.floor(addrbits)) local xpos = S.cast(S.bitSlice( sPhase:get(), 0, addrbits-1), types.uint(addrbits)) local phasebits = (math.log(scale)/math.log(2)) local phase = S.cast(S.bitSlice( sPhase:get(), addrbits, addrbits+phasebits-1 ), types.uint(phasebits)) local sBuffer = systolicModule:add( fpgamodules.bramSDP( true, (A:verilogBits()*W)/8, ITYPE:verilogBits()/8, ITYPE:verilogBits()/8,nil,true ):instantiate("buffer") ) local reading = S.eq( phase, S.constant(0,types.uint(phasebits)) ):disablePipelining() local pipelines = {sBuffer:writeAndReturnOriginal(S.tuple{xpos,S.cast(sinp,types.bits(ITYPE:verilogBits()))}, reading), sPhase:setBy( S.constant(1, types.uint(16)) )} local out = S.select( reading, sinp, S.cast(sBuffer:read(xpos),ITYPE) ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.tuple{out,S.constant(true,types.bool())}, "process_output", pipelines, nil, CE) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), reading, "ready", {} ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {sPhase:reset()},S.parameter("reset",types.bool())) ) return systolicModule end local upsampleYSim = function() for y=0,(H*scale)-1 do for x=0,W-1,math.max(T,1) do if y%scale==0 then coroutine.yield(true) else coroutine.yield(false) end end end end res.RVDelay, res.inputBurstiness = J.simulateFIFO( upsampleYSim, res.sdfInput, res.name, true, (W*H)/math.max(T,1) ) res.outputBurstiness = 2 -- hack: make it wait to start writing stuff out until it's fifo is full enough return modules.waitOnInput( rigel.newFunction(res) ) end) -- Stateful{uint8,uint8,uint8...} -> Stateful(uint8) -- Ignores the counts. Just interleaves between streams. -- N: number of streams. -- period==0: ABABABAB, period==1: AABBAABBAABB, period==2: AAAABBBB modules.interleveSchedule = memoize(function( N, period ) err( type(N)=="number", "N must be number") err( J.isPowerOf2(N), "N must be power of 2") err( type(period)=="number", "period must be number") local log2N = math.ceil(math.log(N)/math.log(2)) local res = {kind="interleveSchedule", N=N, period=period, delay=0, inputType=types.rv(types.Par(types.Trigger)), outputType=types.rv(types.Par(types.uint(log2N))), sdfInput=SDF{1,1}, sdfOutput=SDF{1,1}, stateful=true } res.name = "InterleveSchedule_"..N.."_"..period function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.uint(8), "interleve schedule phase %d", true):instantiate("printInst") ) end local inp = S.parameter("process_input", rigel.lower(res.inputType) ) local phase = systolicModule:add( Ssugar.regByConstructor( types.uint(8), fpgamodules.incIfWrap( types.uint(8), 255, 1 ) ):setInit(0):setReset(0):CE(true):instantiate("interlevePhase") ) local CE = S.CE("CE") local pipelines = {phase:setBy( S.constant(true,types.bool()))} if DARKROOM_VERBOSE then table.insert(pipelines, printInst:process(phase:get())) end systolicModule:addFunction( S.lambda("process", inp, S.cast(S.bitSlice(phase:get(),period,period+log2N-1),types.uint(log2N)), "process_output", pipelines, nil, CE ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {phase:reset()}, S.parameter("reset",types.bool())) ) return systolicModule end res = rigel.newFunction(res) if terralib~=nil then res.terraModule = MT.interleveSchedule( res, N, period ) end return res end) -- wtop is the width of the largest (top) pyramid level modules.pyramidSchedule = memoize(function( depth, wtop, T ) err(type(depth)=="number", "depth must be number") err(type(wtop)=="number", "wtop must be number") err(type(T)=="number", "T must be number") local log2N = math.ceil(math.log(depth)/math.log(2)) local res = {kind="pyramidSchedule", wtop=wtop, depth=depth, T=T, delay=0, inputType=types.rv(types.Par(types.Trigger)), outputType=types.rv(types.Par(types.uint(log2N))), sdfInput=SDF{1,1}, sdfOutput=SDF{1,1}, stateful=true } res.name = "PyramidSchedule_depth_"..tostring(depth).."_wtop_"..tostring(wtop).."_T_"..tostring(T) -------------------- local pattern = {} local minTargetW = math.pow(2,depth-1)/math.pow(4,depth-1) local totalW = 0 for d=0,depth-1 do local targetW = math.pow(2,depth-1)/math.pow(4,d) targetW = targetW/minTargetW for t=1,targetW do table.insert(pattern,d) end end -------------------- assert(#pattern<=128) local patternTotal = #pattern while #pattern<128 do table.insert(pattern,0) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(8), types.uint(16),types.uint(log2N)}, "pyramid schedule addr %d wcnt %d out %d", true):instantiate("printInst") ) end local tokensPerAddr = (wtop*minTargetW)/T local inp = S.parameter("process_input", rigel.lower(res.inputType) ) local addr = systolicModule:add( Ssugar.regByConstructor( types.uint(8), fpgamodules.incIfWrap( types.uint(8), patternTotal-1, 1 ) ):setInit(0):CE(true):setReset(0):instantiate("patternAddr") ) local wcnt = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIfWrap( types.uint(16), tokensPerAddr-1, 1 ) ):setInit(0):CE(true):setReset(0):instantiate("wcnt") ) local patternRam = systolicModule:add(fpgamodules.ram128(types.uint(log2N), pattern):instantiate("patternRam")) local CE = S.CE("CE") local pipelines = {addr:setBy( S.eq(wcnt:get(),S.constant(tokensPerAddr-1,types.uint(16))):disablePipelining() )} table.insert(pipelines, wcnt:setBy( S.constant(true,types.bool()) ) ) local out = patternRam:read(addr:get()) if DARKROOM_VERBOSE then table.insert(pipelines, printInst:process(S.tuple{addr:get(),wcnt:get(),out})) end systolicModule:addFunction( S.lambda("process", inp, out, "process_output", pipelines, nil, CE ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {addr:reset(), wcnt:reset()}, S.parameter("reset",types.bool())) ) return systolicModule end res = rigel.newFunction(res) if terralib~=nil then res.terraModule = MT.pyramidSchedule( res, depth, wtop, T ) end return res end) -- WARNING: validOut depends on readyDownstream modules.toHandshakeArrayOneHot = memoize(function( A, inputRates ) err( types.isType(A), "A must be type" ) rigel.expectBasic(A) err( type(inputRates)=="table", "inputRates must be table") assert( SDFRate.isSDFRate(inputRates)) local res = {kind="toHandshakeArrayOneHot", A=A, inputRates = inputRates} res.inputType = types.array2d(types.RV(types.Par(A)), #inputRates) res.outputType = rigel.HandshakeArrayOneHot( types.Par(A), #inputRates ) res.sdfInput = SDF(inputRates) res.sdfOutput = SDF(inputRates) res.stateful = false res.name = sanitize("ToHandshakeArrayOneHot_"..tostring(A).."_"..#inputRates) res.delay = 0 if terralib~=nil then res.terraModule = MT.toHandshakeArrayOneHot( res,A, inputRates ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name):onlyWire(true) local printStr = "IV ["..table.concat(J.broadcast("%d",#inputRates),",").."] OV %d readyDownstream %d/"..(#inputRates-1) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple(J.concat(J.broadcast(types.bool(),#inputRates+1),{types.uint(8)})), printStr):instantiate("printInst") ) end local inp = S.parameter( "process_input", rigel.lower(res.inputType) ) local inpData = {} local inpValid = {} for i=1,#inputRates do table.insert( inpData, S.index(S.index(inp,i-1),0) ) table.insert( inpValid, S.index(S.index(inp,i-1),1) ) end local readyDownstream = S.parameter( "ready_downstream", types.uint(8) ) local validList = {} for i=1,#inputRates do table.insert( validList, S.__and(inpValid[i], S.eq(readyDownstream, S.constant(i-1,types.uint(8))) ) ) end local validOut = J.foldt( validList, function(a,b) return S.__or(a,b) end, "X" ) local pipelines = {} local tab = J.concat( J.concat(inpValid,{validOut}), {readyDownstream}) assert(#tab==(#inputRates+2)) if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process( S.tuple(tab) ) ) end local dataOut = fpgamodules.wideMux( inpData, readyDownstream ) systolicModule:addFunction( S.lambda("process", inp, S.tuple{dataOut,validOut} , "process_output", pipelines) ) local readyOut = J.map(J.range(#inputRates), function(i) return S.eq(S.constant(i-1,types.uint(8)), readyDownstream) end ) systolicModule:addFunction( S.lambda("ready", readyDownstream, S.cast(S.tuple(readyOut),types.array2d(types.bool(),#inputRates)), "ready" ) ) --systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro",nil,S.parameter("reset",types.bool())) ) return systolicModule end return rigel.newFunction( res ) end) -- inputRates is a list of SDF rates -- {StatefulHandshakRegistered(A),StatefulHandshakRegistered(A),...} -> StatefulHandshakRegistered({A,stream:uint8}), -- where stream is the ID of the input that corresponds to the output modules.sequence = memoize(function( A, inputRates, Schedule, X ) err( types.isType(A), "A must be type" ) err( A:isData(), "sequence: type must be data type") err( type(inputRates)=="table", "inputRates must be table") assert( SDFRate.isSDFRate(inputRates) ) err( rigel.isFunction(Schedule), "schedule must be darkroom function") local log2N = math.ceil(math.log(#inputRates)/math.log(2)) err( rigel.lower(Schedule.outputType)==types.uint(log2N), "schedule function has incorrect output type, ",Schedule.outputType," should be : ",types.Uint(log2N)) rigel.expectBasic(A) assert(X==nil) local res = {kind="sequence", A=A, inputRates=inputRates, schedule=Schedule} res.inputType = rigel.HandshakeArrayOneHot( types.Par(A), #inputRates ) res.outputType = rigel.HandshakeTmuxed( types.Par(A), #inputRates ) err( type(Schedule.stateful)=="boolean", "Schedule missing stateful annotation") res.stateful = Schedule.stateful res.name = sanitize("Sequence_"..tostring(A).."_"..#inputRates) res.delay = 0 local sdfSum = SDFRate.sum(inputRates) err( Uniform(sdfSum[1]):eq(sdfSum[2]):assertAlwaysTrue(), "inputRates must sum to 1, but are: "..tostring(SDF(inputRates)).." sum:"..tostring(sdfSum[1]).."/"..tostring(sdfSum[2])) -- the output rates had better be the same as the inputs! res.sdfInput = SDF(inputRates) res.sdfOutput = SDF(inputRates) if terralib~=nil then res.terraModule = MT.serialize( res, A, inputRates, Schedule) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name):onlyWire(true) local scheduler = systolicModule:add( Schedule.systolicModule:instantiate("Scheduler") ) local printInst if DARKROOM_VERBOSE then printInst= systolicModule:add( S.module.print( types.tuple{types.uint(8),types.bool(),types.uint(8),types.bool()}, "Serialize OV %d/"..(#inputRates-1).." readyDownstream %d ready %d/"..(#inputRates-1).." stepSchedule %d"):instantiate("printInst") ) end local resetValid = S.parameter("reset_valid", types.bool() ) local inp = S.parameter( "process_input", rigel.lower(res.inputType) ) local inpData = S.index(inp,0) local inpValid = S.index(inp,1) local readyDownstream = S.parameter( "ready_downstream", types.bool() ) local pipelines = {} local resetPipelines = {} local stepSchedule = S.__and(inpValid, readyDownstream) assert( Schedule.systolicModule:getDelay("process")==0 ) local schedulerCE = readyDownstream local nextFIFO = scheduler:process(S.trigger,stepSchedule, schedulerCE) table.insert( resetPipelines, scheduler:reset(nil, resetValid ) ) local validOut = S.select(inpValid,nextFIFO,S.constant(#inputRates,types.uint(8))) local readyOut = S.select( readyDownstream, nextFIFO, S.constant(#inputRates,types.uint(8))) if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process( S.tuple{validOut, readyDownstream, readyOut, stepSchedule} ) ) end systolicModule:addFunction( S.lambda("process", inp, S.tuple{ inpData, validOut } , "process_output", pipelines ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", resetPipelines, resetValid ) ) systolicModule:addFunction( S.lambda("ready", readyDownstream, readyOut, "ready" ) ) return systolicModule end return rigel.newFunction(res) end) -- tmuxed: should we return a tmuxed type? or just a raw Handshake stream (no ids). Default false modules.arbitrate = memoize(function( A, inputRates, tmuxed, X ) err( types.isType(A), "A must be type, but is: "..tostring(A) ) err( A:isSchedule(),"arbitrate: type must be schedule type" ) err( type(inputRates)=="table", "inputRates must be table") assert( SDFRate.isSDFRate(inputRates) ) err( #inputRates>1, "arbitrate: must be passed more than 1 input rate! Or, there's nothing to arbitrate. Passed:",inputRates ) if tmuxed==nil then tmuxed=false end assert(type(tmuxed)=="boolean") err(X==nil,"arbitrate: too many arguments") local res = {kind="arbitrate", A=A, inputRates=inputRates} res.name = sanitize("Arbitrate_"..tostring(A).."_"..#inputRates) res.stateful = false res.delay = 0 res.inputType = types.array2d( types.RV(A), #inputRates ) if tmuxed then res.outputType = rigel.HandshakeTmuxed( A, #inputRates ) else res.outputType = types.RV( A ) end local sdfSum = SDFRate.sum(inputRates) -- normalize to 1 local tmp = {} for k,v in ipairs(inputRates) do table.insert(tmp,SDFRate.fracMultiply(v,{sdfSum[2],sdfSum[1]})) end local sdfSumTmp = SDFRate.sum(tmp) err( Uniform(sdfSumTmp[1]):eq(sdfSumTmp[2]):assertAlwaysTrue(), "inputRates must sum to <= 1, but are: "..tostring(SDF(tmp)).." sum:"..tostring(sdfSumTmp[1]).."/"..tostring(sdfSumTmp[2])) res.sdfInput = SDF(tmp) res.sdfOutput = SDF{1,1} if terralib~=nil then res.terraModule = MT.Arbitrate( res, A, inputRates, tmuxed) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name):onlyWire(true) local inp = S.parameter( "process_input", rigel.lower(res.inputType) ) local inpData = {} local inpValid = {} for i=1,#inputRates do table.insert( inpData, S.index(S.index(inp,i-1),0) ) table.insert( inpValid, S.index(S.index(inp,i-1),1) ) end local readyDownstream = S.parameter( "ready_downstream", types.bool() ) -- which order do we prefer to read the interfaces in? -- ie if multiple are true, which do we prefer to read local order = J.range(#inputRates) local readyOut = {} local dataOut for idx,k in ipairs(order) do if idx==1 then readyOut[k] = inpValid[k] dataOut = inpData[k] else readyOut[k] = S.__and( inpValid[k], S.__not(readyOut[order[idx-1]]) ) dataOut = S.select(readyOut[k],inpData[k],dataOut) end end local validOut = J.foldt( inpValid, function(a,b) return S.__or(a,b) end, "X" ) -- if nothing is valid, set all readys to true (or else we will block progress) for k,v in ipairs(readyOut) do readyOut[k] = S.__and(S.__or(readyOut[k],S.__not(validOut)),readyDownstream) end local pipelines={} systolicModule:addFunction( S.lambda("process", inp, S.tuple{dataOut,validOut} , "process_output", pipelines) ) systolicModule:addFunction( S.lambda("ready", readyDownstream, S.cast(S.tuple(readyOut),types.array2d(types.bool(),#inputRates)), "ready" ) ) return systolicModule end return rigel.newFunction(res) end) -- WARNING: ready depends on ValidIn modules.demux = memoize(function( A, rates, X ) err( types.isType(A), "A must be type" ) err( type(rates)=="table", "rates must be table") assert( SDFRate.isSDFRate(rates) ) rigel.expectBasic(A) assert(X==nil) local res = {kind="demux", A=A, rates=rates} res.inputType = rigel.HandshakeTmuxed( types.Par(A), #rates ) res.outputType = types.array2d( types.RV(types.Par(A)), #rates) res.stateful = false res.name = sanitize("Demux_"..tostring(A).."_"..#rates) local sdfSum = SDFRate.sum(rates) err( SDFRate.fracEq(sdfSum,{1,1}), "rates must sum to 1") res.sdfInput = SDF(rates) res.sdfOutput = SDF(rates) res.delay = 0 if terralib~=nil then res.terraModule = MT.demux(res,A,rates) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name):onlyWire(true) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple( J.concat({types.uint(8)},J.broadcast(types.bool(),#rates+1))), "Demux IV %d readyDownstream ["..table.concat(J.broadcast("%d",#rates),",").."] ready %d"):instantiate("printInst") ) end local inp = S.parameter( "process_input", rigel.lower(res.inputType) ) local inpData = S.index(inp,0) local inpValid = S.index(inp,1) -- uint8 local readyDownstream = S.parameter( "ready_downstream", types.array2d( types.bool(), #rates ) ) local pipelines = {} local out = {} local readyOut = {} for i=1,#rates do table.insert( out, S.tuple{inpData, S.eq(inpValid,S.constant(i-1,types.uint(8))) } ) table.insert( readyOut, S.__and( S.index(readyDownstream,i-1), S.eq(inpValid,S.constant(i-1,types.uint(8)))) ) end local readyOut = J.foldt( readyOut, function(a,b) return S.__or(a,b) end, "X" ) readyOut = S.__or(readyOut, S.eq(inpValid, S.constant(#rates, types.uint(8)) ) ) local printList = {} table.insert(printList,inpValid) for i=1,#rates do table.insert( printList, S.index(readyDownstream,i-1) ) end table.insert(printList,readyOut) if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process(S.tuple(printList) ) ) end systolicModule:addFunction( S.lambda("process", inp, S.cast(S.tuple(out),rigel.lower(res.outputType)) , "process_output", pipelines ) ) systolicModule:addFunction( S.lambda("ready", readyDownstream, readyOut, "ready" ) ) return systolicModule end return rigel.newFunction(res) end) modules.flattenStreams = memoize( function( A, rates, X ) err( types.isType(A), "A must be type" ) err( type(rates)=="table", "rates must be table") assert( SDFRate.isSDFRate(rates) ) rigel.expectBasic(A) assert(X==nil) local res = {kind="flattenStreams", A=A, rates=rates} res.inputType = rigel.HandshakeTmuxed( types.Par(A), #rates ) res.outputType = rigel.Handshake(A) res.stateful = false local sdfSum = SDFRate.sum(rates) --rates[1][1]/rates[1][2] --for i=2,#rates do sdfSum = sdfSum + (rates[i][1]/rates[i][2]) end err( Uniform(sdfSum[1]):eq(sdfSum[2]):assertAlwaysTrue(), "inputRates must sum to 1, but are: "..tostring(SDF(rates)).." sum:"..tostring(sdfSum[1]).."/"..tostring(sdfSum[2])) res.sdfInput = SDF(rates) res.sdfOutput = SDF{1,1} res.name = sanitize("FlattenStreams_"..tostring(A).."_"..#rates) res.delay = 0 if terralib~=nil then res.terraModule = MT.flattenStreams(res,A,rates) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name):onlyWire(true) --local resetValid = S.parameter("reset_valid", types.bool() ) local inp = S.parameter( "process_input", rigel.lower(res.inputType) ) local inpData = S.index(inp,0) local inpValid = S.index(inp,1) local readyDownstream = S.parameter( "ready_downstream", types.bool() ) local pipelines = {} --local resetPipelines = {} systolicModule:addFunction( S.lambda("process", inp, S.tuple{inpData,S.__not(S.eq(inpValid,S.constant(#rates,types.uint(8))))} , "process_output", pipelines ) ) --systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", resetPipelines, resetValid ) ) systolicModule:addFunction( S.lambda("ready", readyDownstream, readyDownstream, "ready" ) ) return systolicModule end return rigel.newFunction(res) end) -- Takes StatefulHandshake(A) to (StatefulHandshake(A))[N] -- HACK(?!): when we fan-out a handshake stream, we need to synchronize the downstream modules. -- (IE if one is ready but the other isn't, we need to stall both). -- We do that here by modifying the valid bit combinationally!! This could potentially -- cause a combinationaly loop (validOut depends on readyDownstream) if another later unit does the opposite -- (readyUpstream depends on validIn). But I don't think we will have any units that do that?? modules.broadcastStream = memoize(function(A,W,H,X) err( A==nil or types.isType(A), "broadcastStream: type must be type, but is: "..tostring(A)) err( A==nil or A:isSchedule() or A:isData(),"broadcastStream: type must be data or schedule type, but is: "..tostring(A)) err( type(W)=="number", "broadcastStream: W must be number") if H==nil then H=1 end err( type(H)=="number", "broadcastStream: H must be number") assert(X==nil) local res = {kind="broadcastStream", A=A, W=W, H=H, stateful=false, delay=0} res.inputType = types.RV(A) res.outputType = types.array2d(types.RV(A), W, H) res.sdfInput = SDF{1,1} res.sdfOutput = SDF(J.broadcast({1,1},W*H)) res.name = sanitize("BroadcastStream_"..tostring(A).."_W"..tostring(W).."_H"..tostring(H)) if terralib~=nil then res.terraModule = MT.broadcastStream(res,W,H) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name):onlyWire(true) local printStr = "IV %d readyDownstream ["..table.concat( J.broadcast("%d",W*H),",").."] ready %d" local printInst -- if DARKROOM_VERBOSE then -- printInst = systolicModule:add( S.module.print( types.tuple( J.broadcast(types.bool(),N+2)), printStr):instantiate("printInst") ) -- end local inp = S.parameter( "process_input", rigel.lower(res.inputType) ) local inpData, inpValid if A==nil then -- HandshakeTrigger inpValid = inp else inpData = S.index(inp,0) inpValid = S.index(inp,1) end local readyDownstream = S.parameter( "ready_downstream", types.array2d(types.bool(),W,H) ) local readyDownstreamList = J.map(J.range(W*H), function(i) return S.index(readyDownstream,i-1) end ) local allReady = J.foldt( readyDownstreamList, function(a,b) return S.__and(a,b) end, "X" ) local validOut = S.__and(inpValid,allReady) local out if inpData==nil then -- HandshakeTrigger out = S.tuple( J.broadcast(validOut, W*H)) out = S.cast(out, types.array2d(types.bool(),W,H) ) else out = S.tuple( J.broadcast(S.tuple{inpData, validOut}, W,H)) end out = S.cast(out, rigel.lower(res.outputType) ) local pipelines = {} --if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process( S.tuple( J.concat( J.concat({inpValid}, readyDownstreamList),{allReady}) ) ) ) end systolicModule:addFunction( S.lambda("process", inp, out, "process_output", pipelines ) ) systolicModule:addFunction( S.lambda("ready", readyDownstream, allReady, "ready" ) ) return systolicModule end return rigel.newFunction(res) end) -- output type: {uint16,uint16}[T] -- asArray: return output as u16[2][T] instead modules.posSeq = memoize(function( W_orig, H, T, bits, framed, asArray, X ) if bits==nil then bits=16 end err( type(bits)=="number", "posSeq: bits should be number, but is: "..tostring(bits)) local W = Uniform(W_orig) err(type(H)=="number","posSeq: H must be number") err(type(T)=="number","posSeq: T must be number, but is: "..tostring(T)) err( W:gt(0):assertAlwaysTrue(), "posSeq: W must be >0, but is: "..tostring(W)); err(H>0, "posSeq: H must be >0"); err(T>=0, "posSeq: T must be >=0"); if framed==nil then framed=false end err( type(framed)=="boolean", "posSeq: framed should be boolean") if asArray==nil then asArray=false end err( type(asArray)=="boolean", "posSeq: asArray should be boolean") err(X==nil, "posSeq: too many arguments") local res = {kind="posSeq", T=T, W=W, H=H } res.inputType = types.rv(types.Par(types.Trigger)) local sizeType = types.tuple({types.uint(bits),types.uint(bits)}) if asArray then sizeType = types.array2d(types.uint(bits),2) end if T==0 then res.outputType = sizeType if framed then res.outputType = types.rv(types.Seq(types.Par(res.outputType),W_orig,H)) res.inputType = types.rv(types.Seq(types.Par(types.Trigger),W_orig,H)) end else res.outputType = types.array2d(sizeType,T) if framed then res.outputType = types.rv(types.ParSeq(res.outputType,W_orig,H)) res.inputType = types.rv(types.ParSeq(types.Array2d(types.Trigger,T),W_orig,H)) end end res.stateful = true res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} -- res.delay = J.sel(T>1,math.floor(S.delayScale),0) res.delay = J.sel(T>1,math.floor(S.delayTable["+"][bits]*S.delayScale),0) res.name = sanitize("PosSeq_W"..tostring(W_orig).."_H"..H.."_T"..T.."_bits"..tostring(bits).."_framed"..tostring(framed)) if terralib~=nil then res.terraModule = MT.posSeq(res,W,H,T,asArray) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local posX = systolicModule:add( Ssugar.regByConstructor( types.uint(bits), fpgamodules.incIfWrap( types.uint(bits), W-math.max(T,1), math.max(T,1) ) ):setInit(0):setReset(0):CE(true):instantiate("posX_posSeq") ) local posY = systolicModule:add( Ssugar.regByConstructor( types.uint(bits), fpgamodules.incIfWrap( types.uint(bits), H-1 ) ):setInit(0):setReset(0):CE(true):instantiate("posY_posSeq") ) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(bits),types.uint(bits)}, "x %d y %d", true):instantiate("printInst") ) end local incY = S.eq( posX:get(), (W-math.max(T,1)):toSystolic(types.uint(bits)) ):disablePipelining() local out = {S.tuple{posX:get(),posY:get()}} for i=1,T-1 do table.insert(out, S.tuple{posX:get()+S.constant(i,types.uint(bits)),posY:get()}) end local CE = S.CE("CE") local pipelines = {} table.insert( pipelines, posX:setBy( S.constant(true, types.bool() ) ) ) table.insert( pipelines, posY:setBy( incY ) ) if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process( S.tuple{posX:get(),posY:get()}) ) end local finout if T==0 then finout = out[1] if asArray then finout = S.cast(finout,types.array2d(types.uint(bits),2)) end else if asArray then local newout = {} for _,v in ipairs(out) do table.insert(newout, S.cast(v,types.array2d(types.uint(bits),2)) ) end finout = S.cast(S.tuple(newout),types.array2d(types.Array2d(types.uint(bits),2),T)) else finout = S.cast(S.tuple(out),types.array2d(types.tuple{types.uint(bits),types.uint(bits)},T)) end --assert(asArray==false) -- NYI end systolicModule:addFunction( S.lambda("process", S.parameter("pinp",res.inputType:lower()), finout, "process_output", pipelines, nil, CE ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {posX:reset(), posY:reset()}, S.parameter("reset",types.bool())) ) systolicModule:complete() return systolicModule end return rigel.newFunction(res) end) -- this takes a pure function f : {{int32,int32}[T],inputType} -> outputType -- and drives the first tuple with (x,y) coord -- returns a function with type Stateful(inputType)->Stateful(outputType) -- sdfOverride: we can use this to define stateful->StatefulV interfaces etc, so we may want to override the default SDF rate modules.liftXYSeq = memoize(function( name, generatorStr, f, W_orig, H, T, bits, X ) if bits==nil then bits=16 end err( type(bits)=="number", "liftXYSeq: bits must be number or nil") err( type(name)=="string", "liftXYSeq: name must be string" ) err( type(generatorStr)=="string", "liftXYSeq: generatorStr must be string" ) err( rigel.isFunction(f), "liftXYSeq: f must be function") err( f.inputType:isrv() and f.inputType:deInterface():isData(), "liftXYSeq: f must have rv parallel input type, but is: "..tostring(f.inputType) ) err( f.inputType:deInterface():isTuple(),"liftXYSeq: f must have tuple input type, but is: "..tostring(f.inputType) ) local W = Uniform(W_orig) err( type(H)=="number", "liftXYSeq: H must be number") err( type(T)=="number", "liftXYSeq: T must be number") err( X==nil, "liftXYSeq: too many arguments") local G = require "generators.core" local inputType = f.inputType:deInterface().list[2] local inp = rigel.input( types.rv(types.Par(inputType)) ) local p = rigel.apply("p", modules.posSeq(W,H,T,bits), G.ValueToTrigger(inp) ) local out = rigel.apply("m", f, rigel.concat("ptup", {p,inp}) ) local res = modules.lambda( "liftXYSeq_"..name.."_W"..tostring(W_orig), inp, out,nil,generatorStr ) return res end) -- this takes a function f : {{uint16,uint16},inputType} -> outputType -- and returns a function of type inputType[T]->outputType[T] function modules.liftXYSeqPointwise( name, generatorStr, f, W, H, T, X ) err( type(name)=="string", "liftXYSeqPointwise: name must be string" ) err( type(generatorStr)=="string", "liftXYSeqPointwise: generatorStr must be string" ) err( rigel.isFunction(f), "liftXYSeqPointwise: f must be function") err( f.inputType:isrv() and f.inputType:deInterface():isData(), "liftXYSeqPointwise: f input type must be parallel, but is: "..tostring(f.inputType)) err( f.inputType:deInterface():isTuple(), "liftXYSeqPointwise: f input type must be tuple, but is: "..tostring(f.inputType)) err( type(W)=="number", "liftXYSeqPointwise: W must be number" ) err( type(H)=="number", "liftXYSeqPointwise: H must be number" ) err( type(T)=="number", "liftXYSeqPointwise: T must be number" ) err( X==nil, "liftXYSeqPointwise: too many arguments" ) local fInputType = f.inputType:deInterface().list[2] local inputType = types.array2d(fInputType,T) local xyinner = types.tuple{types.uint(16),types.uint(16)} local xyType = types.array2d(xyinner,T) local innerInputType = types.tuple{xyType, inputType} local inp = rigel.input( types.rv(types.Par(innerInputType)) ) local unpacked = rigel.apply("unp", modules.SoAtoAoS(T,1,{xyinner,fInputType}), inp) -- {{uint16,uint16},A}[T] local out = rigel.apply("f", modules.map(f,T), unpacked ) local ff = modules.lambda("liftXYSeqPointwise_"..f.kind, inp, out ) return modules.liftXYSeq(name, generatorStr, ff, W, H, T ) end -- takes an image of size A[W,H] to size A[W-L-R,H-B-Top] -- indexMode: cropSeq is basically the same as slice! if indexMode==true, we expect the crop to only return 1 item -- and, instead of returning that as an array, we just return the item. This allows us to use cropSeq to implement index -- on non-parallel types modules.cropSeq = memoize(function( A, W_orig, H, V, L, R_orig, B, Top, framed, indexMode, X ) local BITS = 32 err( types.isType(A), "cropSeq: type must be rigel type, but is: ",A) err( rigel.isBasic(A),"cropSeq: expects basic type, but is: "..tostring(A)) local W = Uniform(W_orig) err( W:gt(0):assertAlwaysTrue(),"cropSeq: W must be >=0, but is: "..tostring(W) ) --err( type(W)=="number", "cropSeq: W must be number"); err(W>=0, "cropSeq: W must be >=0") err( type(H)=="number", "cropSeq: H must be number"); err(H>=0, "cropSeq: H must be >=0") err( type(V)=="number", "cropSeq: V must be number"); err(V>=0, "cropSeq: V must be >=0") err( type(L)=="number", "cropSeq: L must be number"); err(L>=0, "cropSeq: L must be >=0") --err( type(R)=="number", "cropSeq: R must be number"); err(R>=0, "cropSeq: R must be >=0") local R = Uniform(R_orig) err( type(B)=="number", "cropSeq: B must be number"); err(B>=0, "cropSeq: B must be >=0") err( type(Top)=="number", "cropSeq: Top must be number"); err(Top>=0, "cropSeq: Top must be >=0") if framed==nil then framed=false end err( type(framed)=="boolean", "cropSeq: framed must be boolean") err( L>=0, "cropSeq, L must be >=0") err( R:ge(0):assertAlwaysTrue(), "cropSeq, R must be >= 0, but is: "..tostring(R)) err( V==0 or (W%V):eq(0):assertAlwaysTrue(), "cropSeq, W%V must be 0. W="..tostring(W)..", V="..tostring(V)) err( V==0 or L%V==0, "cropSeq, L%V must be 0. L="..tostring(L).." V="..tostring(V)) err( V==0 or (R%V):eq(0):assertAlwaysTrue(), "cropSeq, R%V must be 0, R="..tostring(R)..", V="..tostring(V)) err( V==0 or ((W-L-R)%V):eq(0):assertAlwaysTrue(), "cropSeq, (W-L-R)%V must be 0") err( (W-L-R):gt(0):assertAlwaysTrue(),"cropSeq, (W-L-R) must be >0! This means you have cropped the whole image! W=",W," L=",L," R=",R) err( (H-B-Top)>0,"cropSeq, (H-B-Top) must be >0! This means you have cropped the whole image!") err( X==nil, "cropSeq: too many arguments" ) --err( W:lt(math.pow(2,BITS)-1):assertAlwaysTrue(), "cropSeq: width too large!") err( H<math.pow(2,BITS), "cropSeq: height too large!") if indexMode==nil then indexMode = false end err( type(indexMode)=="boolean","cropSeq: indexMode should be bool" ) if indexMode then err( (Uniform(W_orig)-L-R_orig):eq(1),"cropSeq: in indexMode, output size should be 1, but is W:",W_orig," L:",L, " R:",R_orig ) err( (H-B-Top)==1,"cropSeq: in indexMode, output size should be 1, but is H:",H," B:",B," Top:",Top ) end local inputType if V==0 then inputType = A else inputType = types.array2d(A,V) end local outputType = types.tuple{inputType,types.bool()} local xyType = types.array2d(types.tuple{types.uint(BITS),types.uint(BITS)},math.max(V,1)) local innerInputType = types.tuple{xyType, inputType} local modname = J.verilogSanitize("CropSeq_"..tostring(A).."_W"..tostring(W_orig).."_H"..tostring(H).."_V"..tostring(V).."_L"..tostring(L).."_R"..tostring(R_orig).."_B"..tostring(B).."_Top"..tostring(Top).."_idx"..tostring(indexMode)) local f = modules.lift( modname, innerInputType, outputType, 0, function(sinp) local sdata = S.index(sinp,1) local sx, sy = S.index(S.index(S.index(sinp,0),0),0), S.index(S.index(S.index(sinp,0),0),1) local sL,sB = S.constant(L,types.uint(BITS)),S.constant(B,types.uint(BITS)) local sWmR,sHmTop = (W-R):toSystolic(types.uint(BITS)),S.constant(H-Top,types.uint(BITS)) -- verilator lint workaround local lbcheck if L==0 and B==0 then lbcheck = S.constant(true,types.bool()) elseif L~=0 and B==0 then lbcheck = S.ge(sx,sL) elseif L==0 and B~=0 then lbcheck = S.ge(sy,sB) else lbcheck = S.__and(S.ge(sx,sL),S.ge(sy,sB)) end local trcheck = S.__and(S.lt(sx,sWmR),S.lt(sy,sHmTop)) local svalid = S.__and(lbcheck,trcheck) return S.tuple{sdata,svalid} end, function() return MT.cropSeqFn( innerInputType, outputType, A, W, H, V, L, R, B, Top ) end, nil, {{((W-L-R)*(H-B-Top))/math.max(1,V),(W*H)/math.max(1,V)}}) local res = modules.liftXYSeq( modname, "rigel.cropSeq", f, W, H, math.max(1,V), BITS ) -- HACK if framed then if V==0 then local it = types.rv(types.Seq(types.Par(res.inputType:deInterface()),W_orig,H)) assert( it:lower()==res.inputType:lower() ) res.inputType = it local ot = types.rvV(types.Seq(types.Par(res.outputType:deInterface().list[1]),W_orig-L-R_orig,H-B-Top)) if indexMode then ot = types.rvV(res.outputType:deInterface().list[1]) end assert( ot:lower()==res.outputType:lower() ) res.outputType = ot else err( indexMode==false or V==1, "NYI - cropSeq, framed, indexMode with V>1 not implemented. V=",V) local it = types.rv(types.ParSeq(res.inputType:deInterface(),W_orig,H)) assert( it:lower()==res.inputType:lower() ) res.inputType = it local ot = types.rvV(types.ParSeq(res.outputType:deInterface().list[1],W_orig-L-R_orig,H-B-Top)) if indexMode then ot = types.rvV(res.outputType:deInterface().list[1]:arrayOver()) end J.err( ot:lower()==res.outputType:lower(),"CropSeq Internal Type error",ot,res.outputType ) res.outputType = ot end else assert( indexMode==false) local ot = types.rvV(types.Par(res.outputType:deInterface().list[1])) assert( ot:lower()==res.outputType:lower() ) res.outputType = ot end local ff = Uniform(W_orig):toNumber()*math.max(Top,B,1) local W_n = Uniform(W_orig):toNumber() local R_n = Uniform(R_orig):toNumber() local cropSim = function() for y=0,H-1 do for x=0,W_n-1,math.max(V,1) do if x>=L and x<(W_n-R_n) and y>=B and y<(H-Top) then coroutine.yield(true) else coroutine.yield(false) end end end end res.inputBurstiness = 0 res.delay = J.sel(V>1,1,0) res.RVDelay, res.outputBurstiness = J.simulateFIFO( cropSim, res.sdfOutput, modname, false ) return res end) -- takes an image of size A[W,H] to size A[W-L-R,H-B-Top]. modules.crop = memoize(function( A, W, H, L, R, B, Top, X ) err( types.isType(A), "A must be a type") err( A~=nil, "crop A==nil" ) err( W~=nil, "crop W==nil" ) err( H~=nil, "crop H==nil" ) err( L~=nil, "crop L==nil" ) err( R~=nil, "crop R==nil" ) err( B~=nil, "crop B==nil" ) err( Top~=nil, "crop Top==nil" ) err( X==nil, "crop: too many arguments" ) J.map({W=W,H=H,L=L,R=R,B=B,Top=Top},function(n,k) err(type(n)=="number","crop expected number for argument "..k.." but is "..tostring(n)); err(n==math.floor(n),"crop non-integer argument "..k..":"..n); err(n>=0,"n<0") end) local res = {kind="crop", type=A, L=L, R=R, B=B, Top=Top, width=W, height=H} res.inputType = types.array2d(A,W,H) res.outputType = types.array2d(A,W-L-R,H-B-Top) res.stateful = false res.sdfInput, res.sdfOutput = SDF{1,1}, SDF{1,1} res.delay=0 res.name = "Crop_"..verilogSanitize(tostring(A)).."_W"..W.."_H"..H.."_L"..L.."_R"..R.."_B"..B.."_Top"..Top -------- if terralib~=nil then res.terraModule = MT.crop( res, A, W, H, L, R, B, Top ) end function res.makeSystolic() err(false, "NYI - crop modules systolic version") end return rigel.newFunction(res) end) -- takes an image of size A[W,H] to size A[W+L+R,H+B+Top]. Fills the new pixels with value 'Value' -- sequentialized to throughput T -- waitForFirstInput: don't start writing frames until we see at least one input! modules.padSeq = memoize(function( A, W_orig, H, T, L, R_orig, B, Top, Value, framed, waitForFirstInput, X ) err( types.isType(A), "A must be a type") err( A~=nil, "padSeq A==nil" ) err( W_orig~=nil, "padSeq W==nil" ) err( H~=nil, "padSeq H==nil" ) err( T~=nil, "padSeq T==nil" ) err( L~=nil, "padSeq L==nil" ) err( R_orig~=nil, "padSeq R==nil" ) err( B~=nil, "padSeq B==nil" ) err( Top~=nil, "padSeq Top==nil" ) err( Value~=nil, "padSeq Value==nil" ) if framed==nil then framed=false end err( type(framed)=="boolean","padSeq: framed should be boolean" ) if waitForFirstInput==nil then waitForFirstInput=false end err( type(waitForFirstInput)=="boolean") err( X==nil, "padSeq: too many arguments" ) J.map({H=H,T=T,L=L,B=B,Top=Top},function(n,k) err(type(n)=="number","PadSeq expected number for argument "..k.." but is "..tostring(n)); err(n==math.floor(n),"PadSeq non-integer argument "..k..":"..n); err(n>=0,"n<0") end) local R = Uniform(R_orig) local W = Uniform(W_orig) A:checkLuaValue(Value) if T~=0 then err( (W%T):eq(0):assertAlwaysTrue(), "padSeq, W%T~=0, W="..tostring(W_orig).." T="..tostring(T)) err( L==0 or (L>=T and L%T==0), "padSeq, L<T or L%T~=0 (L="..tostring(L)..",T="..tostring(T)..")") err( (R:eq(0):Or( R:ge(T):And( (R%T):eq(0)))):assertAlwaysTrue(), "padSeq, R<T or R%T~=0") -- R==0 or (R>=T and R%T==0) err( Uniform((W+L+R)%T):eq(0):assertAlwaysTrue(), "padSeq, (W+L+R)%T~=0") -- (W+L+R)%T==0 end local res = {kind="padSeq", type=A, T=T, L=L, R=R, B=B, Top=Top, value=Value, width=W_orig, height=H} if T==0 then res.inputType = A res.outputType = A else res.inputType = types.array2d(A,T) res.outputType = types.array2d(A,T) end if framed then if T==0 then res.inputType = types.rv(types.Seq( types.Par(res.inputType), W_orig, H )) res.outputType = types.rRvV(types.Seq( types.Par(res.outputType), W_orig+L+R, H+B+Top )) else res.inputType = types.rv(types.ParSeq(res.inputType,W_orig,H)) res.outputType = types.rRvV(types.ParSeq(res.outputType,W_orig+L+R,H+B+Top)) end else res.inputType = types.rv(types.Par(res.inputType)) res.outputType = types.rRvV(types.Par(res.outputType)) end local Tf = math.max(T,1) res.stateful = true res.sdfInput, res.sdfOutput = SDF{ (W_orig*H)/Tf, ((Uniform(W)+Uniform(L)+R)*(H+B+Top))/Tf}, SDF{1,1} res.name = verilogSanitize("PadSeq_"..tostring(A).."_W"..tostring(W_orig).."_H"..H.."_L"..L.."_R"..tostring(R_orig).."_B"..B.."_Top"..Top.."_T"..T.."_Value"..tostring(Value)) local R_n = R:toNumber() local W_n = W:toNumber() local padSim = function() local totalOut = 0 for y=0,(H+B+Top)-1 do for x=0,(W_n+L+R_n)-1,math.max(T,1) do if x>=L and x<(W_n+L) and y>=B and y<(H+B) then totalOut = totalOut+1 coroutine.yield(true) else coroutine.yield(false) end end end end res.delay = 0 res.RVDelay, res.inputBurstiness = J.simulateFIFO( padSim, res.sdfInput, res.name, true, (W_n*H)/math.max(T,1) ) --res.inputBurestiness = res.inputBurstiness + 1 res.outputBurstiness = 1 -- hack: module starts up at time=0, regardless of when triggered. Do this to throttle it. if terralib~=nil then res.terraModule = MT.padSeq( res, A, W, H, T, L, R, B, Top, Value ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local posX = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.incIfWrap( types.uint(32), W+L+R-Tf, Tf ) ):CE(true):setInit(0):setReset(0):instantiate("posX_padSeq") ) local posY = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIfWrap( types.uint(16), H+Top+B-1) ):CE(true):setInit(0):setReset(0):instantiate("posY_padSeq") ) local printInst --if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(16),types.uint(16),types.bool()}, "x %d y %d ready %d", true ):instantiate("printInst") ) end local pinp = S.parameter("process_input", res.inputType:lower() ) local pvalid = S.parameter("process_valid", types.bool() ) local C1 = S.ge( posX:get(), S.constant(L,types.uint(32))) local C2 = S.lt( posX:get(), Uniform(L+W):toSystolic(types.U32) ) local xcheck if L==0 then xcheck = C2 -- verilator lint: C1 always true else xcheck = S.__and(C1,C2) end local C3 = S.ge( posY:get(), S.constant(B,types.uint(16))) local C4 = S.lt( posY:get(), S.constant(B+H,types.uint(16))) local ycheck if B==0 then ycheck = C4 -- verilator lint: C1 always true else ycheck = S.__and(C3,C4) end local isInside = S.__and(xcheck,ycheck):disablePipelining() local pipelines={} local readybit local userinput if waitForFirstInput then local first = S.__and(S.eq( posX:get(), S.constant(0,types.uint(32)) ), S.eq( posY:get(), S.constant(0,types.uint(16)) )) local last = S.__and(S.eq( posX:get(), Uniform(L+W-math.max(T,1)):toSystolic(types.U32) ), S.eq( posY:get(), S.constant(B+H-1,types.uint(16)) )) readybit = S.__and(isInside,S.__not(last)) readybit = S.__or(readybit,first) readybit = readybit:disablePipelining() local databuf = systolicModule:add( S.module.reg( res.inputType:lower(), true ):instantiate("databuf") ) table.insert( pipelines, databuf:set(pinp,readybit) ) userinput = databuf:get() else readybit = isInside userinput = pinp end local incY = S.eq( posX:get(), Uniform(W+L+R-Tf):toSystolic(types.uint(32)) ):disablePipelining() table.insert( pipelines, posY:setBy( incY ) ) table.insert( pipelines, posX:setBy( S.constant(true,types.bool()) ) ) local ValueBroadcast if T==0 then ValueBroadcast = S.constant(Value,A) else ValueBroadcast = S.cast( S.tuple( J.broadcast(S.constant(Value,A),T)) ,types.array2d(A,T)) end local ConstTrue = S.constant(true,types.bool()) local out = S.select( isInside, userinput, ValueBroadcast ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", pinp, S.tuple{out,ConstTrue}, "process_output", pipelines, pvalid, CE) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {posX:reset(), posY:reset()},S.parameter("reset",types.bool())) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), readybit, "ready", {} ) ) return systolicModule end return modules.waitOnInput(rigel.newFunction(res)) end) --StatefulRV. Takes A[inputRate,H] in, and buffers to produce A[outputRate,H] -- 'rate' has a strange meaning here: 'rate' means size of array. -- so inputRate=2 means 2items/clock (2 wide array) -- framedW/H: these are the size of the whole array. So, when framed, we expect input: -- [inputRate,H;framedW,framedH} to [outputRate,H;framedW,framedH} modules.changeRate = memoize(function(A, H, inputRate, outputRate, framed, framedW, framedH, X) err( types.isType(A), "changeRate: A should be a type") err( type(H)=="number", "changeRate: H should be number") err( H>0,"changeRate: H must be >0, but is: ",H) err( type(inputRate)=="number", "changeRate: inputRate should be number, but is: "..tostring(inputRate)) err( inputRate>=0, "changeRate: inputRate must be >=0") err( inputRate==math.floor(inputRate), "changeRate: inputRate should be integer") err( type(outputRate)=="number", "changeRate: outputRate should be number, but is: "..tostring(outputRate)) err( outputRate==math.floor(outputRate), "changeRate: outputRate should be integer, but is: "..tostring(outputRate)) if framed==nil then framed=false end err( type(framed)=="boolean","changeRate: framed must be boolean") err( X==nil, "changeRate: too many arguments") local maxRate = math.max(math.max(inputRate,outputRate),1) local minRate = math.max(math.min(inputRate,outputRate),1) assert(outputRate<1000) err( inputRate==0 or maxRate % inputRate == 0, "maxRate ("..tostring(maxRate)..") % inputRate ("..tostring(inputRate)..") ~= 0") err( outputRate==0 or maxRate % outputRate == 0, "maxRate ("..tostring(maxRate)..") % outputRate ("..tostring(outputRate)..") ~=0") rigel.expectBasic(A) local inputCount = maxRate/math.max(inputRate,1) local outputCount = maxRate/math.max(outputRate,1) local res = {kind="changeRate", type=A, H=H, inputRate=inputRate, outputRate=outputRate} if inputRate>outputRate then -- 8->4 res.inputBurstiness = 0 res.outputBurstiness = 0 res.delay = 1 else -- 4->8 res.inputBurstiness = 0 res.outputBurstiness = 0 res.delay = 1 end if framed then err(type(framedW)=="number", "changeRate: if framed, framedW should be number, but is: "..tostring(framedW)) assert(type(framedH)=="number") assert(inputRate==0 or framedW%inputRate==0) assert(outputRate==0 or framedW%outputRate==0) if inputRate==0 then assert(framedH==1) assert(H==1) res.inputType = types.RV(types.Seq(types.Par(A),framedW,framedH)) elseif inputRate<framedW then assert(H==framedH) res.inputType = types.RV(types.ParSeq(types.array2d(A,inputRate,H),framedW,framedH)) elseif inputRate==framedW then assert(H==framedH) res.inputType = types.RV(types.Par(types.array2d(A,inputRate,H))) else assert(false) end if outputRate==0 then assert(framedH==1) assert(H==1) res.outputType = types.RV(types.Seq(A,framedW,framedH)) elseif outputRate<framedW then assert(framedH==H) res.outputType = types.RV(types.ParSeq(types.array2d(A,outputRate,H),framedW,framedH)) elseif outputRate==framedW then assert(framedH==H) res.outputType = types.RV(types.Par(types.array2d(A,framedW,framedH))) else assert(false) end else if inputRate==0 then assert(H==1) res.inputType = types.RV(types.Par(A)) else res.inputType = types.RV(types.Par(types.array2d(A,inputRate,H))) end if outputRate==0 then assert(H==1) res.outputType = types.RV(types.Par(A)) else res.outputType = types.RV(types.Par(types.array2d(A,outputRate,H))) end end res.stateful = true res.name = J.verilogSanitize("ChangeRate_"..tostring(A).."_from"..inputRate.."_to"..outputRate.."_H"..H.."_framed"..tostring(framed).."_framedW"..tostring(framedW).."_framedH"..tostring(framedH)) if inputRate>outputRate then -- 8 to 4 res.sdfInput, res.sdfOutput = SDF{math.max(outputRate,1),math.max(inputRate,1)},SDF{1,1} else -- 4 to 8 res.sdfInput, res.sdfOutput = SDF{1,1},SDF{math.max(inputRate,1),math.max(outputRate,1)} end function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) local verilog = {res:vHeader()} table.insert(verilog, " reg ["..(maxRate*H*A:verilogBits()-1)..":0] R;\n") local PHASES = maxRate/minRate local phaseBits = math.ceil((math.log(PHASES)/math.log(2))+1) -- phase 0: indicates full (if Ser) or empty (if Deser) table.insert(verilog, " reg ["..(phaseBits-1)..":0] phase;\n") if math.max(inputRate,1)>math.max(outputRate,1) then -- Ser: eg 8 to 4 -- for dumb reasons, we buffer the data in row major order, but need to write it out as column major local COLTOROW = {} for chunk=0,(maxRate/minRate)-1 do for y=0,H-1 do local OR = math.max(outputRate,1) for x=0,OR-1 do table.insert(COLTOROW,res:vInput().."["..(A:verilogBits()*((x+chunk*OR)+y*H+1)-1)..":"..(A:verilogBits()*((x+chunk*OR)+y*H)).."]") end end end table.insert(verilog, " reg hasData;\n") table.insert(verilog,[[ assign ]]..res:vInputReady()..[[ = (hasData==1'b0) || (]]..res:vOutputReady()..[[ && phase==]]..phaseBits..[['d]]..(PHASES-1)..[[); assign ]]..res:vOutputValid()..[[ = (hasData==1'b1); assign ]]..res:vOutputData()..[[ = R[]]..(A:verilogBits()*H*math.max(outputRate,1)-1)..[[:0]; always @(posedge CLK) begin if (reset) begin phase <= ]]..phaseBits..[['d0; hasData <= 1'b0; end else begin if (]]..res:vInputValid().."&&"..res:vInputReady()..[[) begin R <= {]]..table.concat(J.reverse(COLTOROW),",")..[[}; hasData <= 1'b1; phase <= ]]..phaseBits..[['d0; end else if (hasData && ]]..res:vOutputReady()..[[) begin // step the buffers R <= {]]..(A:verilogBits()*H*math.max(outputRate,1))..[['d0,R[]]..(A:verilogBits()*H*maxRate-1)..":"..(A:verilogBits()*H*math.max(outputRate,1))..[[]}; phase <= phase+]]..phaseBits..[['d1; if (phase==]]..phaseBits..[['d]]..(PHASES-1)..[[) begin hasData <= 1'b0; phase <= ]]..phaseBits..[['d0; end end end end ]]) else -- inputRate <= outputRate. Deser: eg 4 to 8 -- for dumb reasons, we buffer the data in column major order, but need to write it out as row major local COLTOROW = {} for y=0,H-1 do for x=0,math.max(outputRate,1)-1 do table.insert(COLTOROW,"R["..(A:verilogBits()*(x*H+y+1)-1)..":"..(A:verilogBits()*(x*H+y)).."]") end end local ROWTOCOL = {} local IRT = math.max(inputRate,1) for x=0,IRT-1 do for y=0,H-1 do table.insert(ROWTOCOL,res:vInput().."["..(A:verilogBits()*(x+y*IRT+1)-1)..":"..(A:verilogBits()*(x+y*IRT)).."]") end end table.insert(verilog,[[ assign ]]..res:vOutputValid()..[[ = (phase==]]..phaseBits..[['d]]..PHASES..[[); assign ]]..res:vInputReady()..[[ = (]]..res:vOutputValid()..[[==1'b0) || (]]..res:vOutputValid()..[[ && ]]..res:vOutputReady()..[[); assign ]]..res:vOutputData()..[[ = {]]..table.concat(J.reverse(COLTOROW),",")..[[}; always @(posedge CLK) begin if (reset) begin phase <= ]]..phaseBits..[['d0; end else begin if (]]..res:vOutputValid()..[[ && ]]..res:vOutputReady()..[[) begin if (]]..res:vInputValid().."&&"..res:vInputReady()..[[) begin phase <= ]]..phaseBits..[['d1; // reading and writing in the same cycle end else begin phase <= ]]..phaseBits..[['d0; end end else if (]]..res:vInputValid().."&&"..res:vInputReady()..[[) begin phase <= phase+]]..phaseBits..[['d1; end if (]]..res:vInputValid().."&&"..res:vInputReady()..[[) begin]]) if math.max(inputRate,1)==math.max(outputRate,1) then table.insert( verilog,[[ R <= ]]..res:vInputData()..";") else table.insert(verilog,[[ R <= {]]..table.concat(J.reverse(ROWTOCOL),",")..[[,R[]]..(A:verilogBits()*H*maxRate-1)..[[:]]..(A:verilogBits()*H*math.max(inputRate,1))..[[]};]]) end table.insert(verilog,[[ end end end ]]) end table.insert(verilog,[[ endmodule ]]) s:verilog( table.concat(verilog,"") ) return s end if terralib~=nil then res.terraModule = MT.changeRate(res, A, H, inputRate, outputRate,maxRate,outputCount,inputCount ) end return rigel.newFunction(res) end) --StatefulRV. Takes A[inputRate,H] in, and buffers to produce A[outputRate,H] -- 'rate' has a strange meaning here: 'rate' means size of array. -- so inputRate=2 means 2items/clock (2 wide array) -- framedW/H: these are the size of the whole array. So, when framed, we expect input: -- [inputRate,H;framedW,framedH} to [outputRate,H;framedW,framedH} modules.changeRateNonFIFO = memoize(function(A, H, inputRate, outputRate, framed, framedW, framedH, X) err( types.isType(A), "changeRate: A should be a type") err( type(H)=="number", "changeRate: H should be number") err( H>0,"changeRate: H must be >0, but is: ",H) err( type(inputRate)=="number", "changeRate: inputRate should be number, but is: "..tostring(inputRate)) err( inputRate>=0, "changeRate: inputRate must be >=0") err( inputRate==math.floor(inputRate), "changeRate: inputRate should be integer") err( type(outputRate)=="number", "changeRate: outputRate should be number, but is: "..tostring(outputRate)) err( outputRate==math.floor(outputRate), "changeRate: outputRate should be integer, but is: "..tostring(outputRate)) if framed==nil then framed=false end err( type(framed)=="boolean","changeRate: framed must be boolean") err( X==nil, "changeRate: too many arguments") local maxRate = math.max(inputRate,outputRate) err( inputRate==0 or maxRate % inputRate == 0, "maxRate ("..tostring(maxRate)..") % inputRate ("..tostring(inputRate)..") ~= 0") err( outputRate==0 or maxRate % outputRate == 0, "maxRate ("..tostring(maxRate)..") % outputRate ("..tostring(outputRate)..") ~=0") rigel.expectBasic(A) local inputCount = maxRate/math.max(inputRate,1) local outputCount = maxRate/math.max(outputRate,1) local res = {kind="changeRate", type=A, H=H, inputRate=inputRate, outputRate=outputRate} if inputRate>outputRate then -- 8->4 res.inputBurstiness = 0 res.outputBurstiness = 0 res.delay = 0 else -- 4->8 res.inputBurstiness = 0 res.outputBurstiness = 0 res.delay = 0 res.RVDelay = (math.max(outputRate,1)/math.max(inputRate,1))-1 end if framed then err(type(framedW)=="number", "changeRate: if framed, framedW should be number, but is: "..tostring(framedW)) assert(type(framedH)=="number") assert(inputRate==0 or framedW%inputRate==0) assert(outputRate==0 or framedW%outputRate==0) if inputRate==0 then assert(framedH==1) assert(H==1) res.inputType = types.rv(types.Seq(types.Par(A),framedW,framedH)) elseif inputRate<framedW then assert(H==framedH) res.inputType = types.rv(types.ParSeq(types.array2d(A,inputRate,H),framedW,framedH)) elseif inputRate==framedW then assert(H==framedH) res.inputType = types.rv(types.Par(types.array2d(A,inputRate,H))) else assert(false) end if outputRate==0 then assert(framedH==1) assert(H==1) res.outputType = types.rRvV(types.Seq(A,framedW,framedH)) elseif outputRate<framedW then assert(framedH==H) res.outputType = types.rRvV(types.ParSeq(types.array2d(A,outputRate,H),framedW,framedH)) elseif outputRate==framedW then assert(framedH==H) res.outputType = types.rRvV(types.Par(types.array2d(A,framedW,framedH))) else assert(false) end else if inputRate==0 then assert(H==1) res.inputType = types.rv(types.Par(A)) else res.inputType = types.rv(types.Par(types.array2d(A,inputRate,H))) end if outputRate==0 then assert(H==1) res.outputType = types.rRvV(types.Par(A)) else res.outputType = types.rRvV(types.Par(types.array2d(A,outputRate,H))) end end res.stateful = true res.name = J.verilogSanitize("ChangeRate_"..tostring(A).."_from"..inputRate.."_to"..outputRate.."_H"..H.."_framed"..tostring(framed).."_framedW"..tostring(framedW).."_framedH"..tostring(framedH)) if inputRate>outputRate then -- 8 to 4 res.sdfInput, res.sdfOutput = SDF{math.max(outputRate,1),math.max(inputRate,1)},SDF{1,1} else -- 4 to 8 res.sdfInput, res.sdfOutput = SDF{1,1},SDF{math.max(inputRate,1),math.max(outputRate,1)} end function res.makeSystolic() local systolicModule= Ssugar.moduleConstructor(res.name) local svalid = S.parameter("process_valid", types.bool() ) local rvalid = S.parameter("reset", types.bool() ) local pinp = S.parameter("process_input", rigel.lower(res.inputType,res.outputType) ) if inputRate>outputRate then -- 8 to 4 local shifterReads = {} for i=0,outputCount-1 do table.insert(shifterReads, S.slice( pinp, i*math.max(outputRate,1), (i+1)*math.max(outputRate,1)-1, 0, H-1 ) ) end local out, pipelines, resetPipelines, ready = fpgamodules.addShifterSimple( systolicModule, shifterReads, DARKROOM_VERBOSE ) if outputRate==0 then out = S.index(out,0) end local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", pinp, S.tuple{ out, S.constant(true,types.bool()) }, "process_output", pipelines, svalid, CE) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", resetPipelines, rvalid ) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), ready, "ready", {} ) ) else -- inputRate <= outputRate. 4 to 8 --assert(H==1) -- NYI local sPhase = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIfWrap( types.uint(16), inputCount-1) ):CE(true):setReset(0):instantiate("phase_changerateup") ) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(16),types.array2d(A,outputRate)}, "phase %d buffer %h", true ):instantiate("printInst") ) end local ConstTrue = S.constant(true,types.bool()) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", { sPhase:reset() }, rvalid ) ) -- in the first cycle (first time inputPhase==0), we don't have any data yet. Use the sWroteLast variable to keep track of this case local validout = S.eq(sPhase:get(),S.constant(inputCount-1,types.uint(16))):disablePipelining() local out if inputRate==0 then assert(H==1) local delayedVals = J.map(J.range(inputCount-1,0), function(i) return pinp(i) end) out = S.cast( S.tuple(delayedVals), types.array2d(A,outputRate,H) ) else out = concat2dArrays(J.map(J.range(inputCount-1,0), function(i) return pinp(i) end)) end local pipelines = {sPhase:setBy(ConstTrue)} if DARKROOM_VERBOSE then table.insert(pipelines, printInst:process(S.tuple{sPhase:get(),out})) end systolicModule:addFunction( S.lambda("process", pinp, S.tuple{out,validout}, "process_output", pipelines, svalid, CE) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), ConstTrue, "ready" ) ) end return systolicModule end if terralib~=nil then res.terraModule = MT.changeRateOld(res, A, H, inputRate, outputRate,maxRate,outputCount,inputCount ) end return modules.waitOnInput(rigel.newFunction(res)) end) modules.linebuffer = memoize(function( A, w_orig, h, T, ymin, framed, X ) assert(Uniform(w_orig):toNumber()>0); assert(h>0); assert(ymin<=0) err(X==nil,"linebuffer: too many args!") err( framed==nil or type(framed)=="boolean", "modules.linebuffer: framed must be bool or nil") err( type(T)=="number" and T>=0,"modules.linebuffer: T must be number >=0") if framed==nil then framed=false end -- if W%T~=0, then we would potentially have to do two reads on wraparound. So don't allow this case. if T>0 then err( (Uniform(w_orig)%Uniform(T)):eq(0):assertAlwaysTrue(), "Linebuffer error, W%T~=0 , W="..tostring(w_orig).." T="..tostring(T)) end local res = {kind="linebuffer", type=A, T=T, w=w_orig, h=h, ymin=ymin } --rigel.expectBasic(A) err( types.isType(A) and A:isData(), "Linebuffer: input should be data type, but is: "..tostring(A)) if T==0 then res.inputType = A res.outputType = types.array2d(A,1,-ymin+1) else res.inputType = types.array2d(A,T) res.outputType = types.array2d(A,T,-ymin+1) end if framed then --res.inputType = types.StaticFramed(res.inputType,true,{{w,h}}) -- this is strange for a reason: inner loop is no longer a serialized flat array, so size must change --res.outputType = types.StaticFramed(res.outputType,false,{{w/T,h}}) --T[1,ymin][T;w,h} if T==0 then res.inputType = types.rv(types.Seq(types.Par(A),w_orig,h)) res.outputType = types.rv(types.Seq(types.Par(types.array2d(A,1,-ymin+1)),w_orig,h)) else res.inputType = types.rv(types.ParSeq(res.inputType,w_orig,h)) res.outputType = types.rv(types.ParSeq(types.array2d(types.array2d(A,1,-ymin+1),T),w_orig,h)) end else res.inputType = types.rv(types.Par(res.inputType)) res.outputType = types.rv(types.Par(types.array2d(A,math.max(T,1),-ymin+1))) end res.stateful = true res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay = -ymin res.name = sanitize("linebuffer_w"..tostring(w_orig).."_h"..tostring(h).."_T"..tostring(T).."_ymin"..tostring(ymin).."_A"..tostring(A).."_framed"..tostring(framed)) if terralib~=nil then res.terraModule = MT.linebuffer(res, A, Uniform(w_orig):toNumber(), h, T, ymin, framed ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter("process_input", rigel.lower(res.inputType) ) local addr = systolicModule:add( fpgamodules.regBy( types.uint(16), fpgamodules.incIfWrap( types.uint(16), (Uniform(w_orig):toNumber()/math.max(T,1))-1), true, nil, 0 ):instantiate("addr") ) local outarray = {} local evicted local bits = rigel.lower(res.inputType):verilogBits() local bytes = J.nearestPowerOf2(J.upToNearest(8,bits)/8) local sizeInBytes = J.nearestPowerOf2((Uniform(w_orig):toNumber()/math.max(T,1))*bytes) local bramMod = fpgamodules.bramSDP( true, sizeInBytes, bytes, nil, nil, true ) local addrbits = math.log(sizeInBytes/bytes)/math.log(2) for y=0,-ymin do local lbinp = evicted if y==0 then lbinp = sinp end if T>0 then for x=1,T do outarray[x+(-ymin-y)*T] = S.index(lbinp,x-1) end else outarray[-ymin-y+1] = lbinp end if y<-ymin then -- last line doesn't need a ram local BRAM = systolicModule:add( bramMod:instantiate("lb_m"..math.abs(y)) ) local upcast = S.cast(lbinp,types.bits(bits)) upcast = S.cast(upcast,types.bits(bytes*8)) evicted = BRAM:writeAndReturnOriginal( S.tuple{ S.cast(addr:get(),types.uint(addrbits)), upcast} ) evicted = S.bitSlice(evicted,0,bits-1) evicted = S.cast( evicted, rigel.lower(res.inputType) ) end end local CE = S.CE("CE") local finalOut if framed and T>0 then local results = {} for v=1,T do local thisV = {} for y=ymin,0 do local yidx = y-ymin table.insert(thisV,outarray[yidx*T+v]) end table.insert( results, S.cast( S.tuple( thisV ), types.array2d(A,1,-ymin+1) ) ) end finalOut = S.cast( S.tuple( results ), rigel.lower(res.outputType) ) else finalOut = S.cast( S.tuple( outarray ), rigel.lower(res.outputType) ) end systolicModule:addFunction( S.lambdaTab { name="process", input=sinp, output=finalOut, outputName="process_output", pipelines={addr:setBy(S.constant(true, types.bool()))}, CE=CE } ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {addr:reset()},S.parameter("reset",types.bool())) ) return systolicModule end return rigel.newFunction(res) end) modules.sparseLinebuffer = memoize(function( A, imageW, imageH, rowWidth, ymin, defaultValue, X ) err(imageW>0,"sparseLinebuffer: imageW must be >0"); err(imageH>0,"sparseLinebuffer: imageH must be >0"); err(ymin<=0,"sparseLinebuffer: ymin must be <=0"); assert(X==nil) err(type(rowWidth)=="number","rowWidth must be number") A:checkLuaValue(defaultValue) local res = {kind="sparseLinebuffer", type=A, imageW=imageW, imageH=imageH, ymin=ymin, rowWidth=rowWidth } rigel.expectBasic(A) res.inputType = types.tuple{A,types.bool()} res.outputType = types.array2d(A,1,-ymin+1) res.stateful = true res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay = 0 res.name = sanitize("SparseLinebuffer_w"..imageW.."_h"..imageH.."_ymin"..ymin.."_A"..tostring(A).."_rowWidth"..tostring(rowWidth)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter("process_input", rigel.lower(res.inputType) ) -- index 1 is ymin+1 row, index 2 is ymin+2 row etc -- remember ymin is <0 local fifos = {} local xlocfifos = {} local resetPipelines = {} local pipelines = {} local currentX = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.incIfWrap( types.uint(16), imageW-1, 1 ) ):CE(true):setInit(0):setReset(0):instantiate("currentX") ) table.insert( pipelines, currentX:setBy( S.constant(true,types.bool()) ) ) table.insert( resetPipelines, currentX:reset() ) for i=1,-ymin do -- TODO hack: due to our FIFO implementation, it needs to have 3 items of slack to meet timing. Just work around this by expanding our # of items by 3. local allocItems = rowWidth+3 table.insert( fifos, systolicModule:add( fpgamodules.fifo(A,allocItems,false):instantiate("fifo"..tostring(i)) ) ) table.insert( xlocfifos, systolicModule:add( fpgamodules.fifo(types.uint(16),allocItems,false):instantiate("xloc"..tostring(i)) ) ) table.insert( resetPipelines, fifos[#fifos]:pushBackReset() ) table.insert( resetPipelines, fifos[#fifos]:popFrontReset() ) table.insert( resetPipelines, xlocfifos[#xlocfifos]:pushBackReset() ) table.insert( resetPipelines, xlocfifos[#xlocfifos]:popFrontReset() ) end local outputArray = {} for outi=1,-ymin do local readyToRead = S.__and( xlocfifos[outi]:hasData(), S.eq(xlocfifos[outi]:peekFront(),currentX:get() ):disablePipeliningSingle() ):disablePipeliningSingle() local dat = fifos[outi]:popFront(nil,readyToRead) local xloc = xlocfifos[outi]:popFront(nil,readyToRead) if outi>1 then table.insert( pipelines, fifos[outi-1]:pushBack( dat, readyToRead ) ) table.insert( pipelines, xlocfifos[outi-1]:pushBack( xloc, readyToRead ) ) else -- has to appear somewhere table.insert( pipelines, xloc ) end outputArray[outi] = S.select(readyToRead,dat,S.constant(defaultValue,A)):disablePipeliningSingle() end local inputPx = S.index(sinp,0) local inputPxValid = S.index(sinp,1) local shouldPush = S.__and(inputPxValid, fifos[-ymin]:ready()):disablePipeliningSingle() -- if we can't store the pixel, we just thrown it out (even though we could write it out once). We don't want it to appear and disappear. -- we don't need to check for overflows later - if it fits into the first FIFO, it'll fit into all of them, I think? Maybe there is some wrap around condition? outputArray[-ymin+1] = S.select( shouldPush, inputPx, S.constant( defaultValue, A ) ):disablePipeliningSingle() table.insert( pipelines, fifos[-ymin]:pushBack( inputPx, shouldPush ) ) table.insert( pipelines, xlocfifos[-ymin]:pushBack( currentX:get(), shouldPush ) ) local CE = S.CE("CE") systolicModule:addFunction( S.lambdaTab { name="process", input=sinp, output=S.cast( S.tuple( outputArray ), rigel.lower(res.outputType) ), outputName="process_output", pipelines=pipelines, CE=CE } ) systolicModule:addFunction( S.lambdaTab { name="reset", input=S.parameter("r",types.null()), output=nil, outputName="ro", pipelines=resetPipelines, valid=S.parameter("reset",types.bool())} ) return systolicModule end res = rigel.newFunction(res) if terralib~=nil then res.terraModule = MT.sparseLinebuffer( res, A, imageW, imageH, rowWidth, ymin, defaultValue) end return res end) -- xmin, ymin are inclusive modules.SSR = memoize(function( A, T, xmin, ymin, framed, framedW_orig, framedH_orig, X ) err( types.isType(A) and A:isData(),"SSR: type should be data type") J.map({T,xmin,ymin}, function(i) assert(type(i)=="number") end) err( ymin<=0, "modules.SSR: ymin>0") err( xmin<=0, "module.SSR: xmin>0") err( T>=0, "modules.SSR: T<0") if framed==nil then framed=false end err(type(framed)=="boolean","SSR: framed must be boolean") err( X==nil,"SSR: too many arguments") local res = {kind="SSR", type=A, T=T, xmin=xmin, ymin=ymin } if framed then err(type(framedW_orig)=="number" or Uniform.isUniform(framedW_orig),"SSR: framedW must be uniform or number") err(type(framedH_orig)=="number" or Uniform.isUniform(framedH_orig),"SSR: framedH must be uniform or number") if T==0 then res.inputType = types.Seq( types.Par(types.array2d(A,1,-ymin+1)),framedW_orig,framedH_orig) res.outputType = types.Seq(types.Par(types.array2d(A,-xmin+1,-ymin+1)),framedW_orig,framedH_orig) else res.inputType = types.ParSeq(types.array2d(types.array2d(A,1,-ymin+1),T),framedW_orig,framedH_orig) res.outputType = types.ParSeq(types.array2d(types.array2d(A,-xmin+1,-ymin+1),T),framedW_orig,framedH_orig) end else assert(T>0) -- NYI res.inputType = types.array2d(A,T,-ymin+1) res.outputType = types.array2d(A,T-xmin,-ymin+1) res.inputType, res.outputType = types.Par(res.inputType), types.Par(res.outputType) end res.inputType, res.outputType = types.rv(res.inputType), types.rv(res.outputType) res.stateful = (xmin<0) res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay=0 res.name = verilogSanitize("SSR_W"..(-xmin+1).."_H"..(-ymin+1).."_T"..tostring(T).."_A"..tostring(A).."_XMIN"..tostring(xmin).."_YMIN"..tostring(ymin).."_framed"..tostring(framed).."_framedW"..tostring(framedW_orig).."_framedH"..tostring(framedH_orig)) if terralib~=nil then res.terraModule = MT.SSR(res, A, T, xmin, ymin, framed ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter("inp", rigel.lower(res.inputType)) local pipelines = {} local SR = {} local out = {} local Tf = math.max(T,1) -- fix for when T==0 for y=0,-ymin do SR[y]={} local x = -xmin+Tf-1 while(x>=0) do if x<-xmin-Tf then SR[y][x] = systolicModule:add( S.module.reg(A,true):instantiate(J.sanitize("SR_x"..x.."_y"..y)) ) table.insert( pipelines, SR[y][x]:set(SR[y][x+Tf]:get()) ) out[y*(-xmin+Tf)+x+1] = SR[y][x]:get() elseif x<-xmin then SR[y][x] = systolicModule:add( S.module.reg(A,true):instantiate(J.sanitize("SR_x"..x.."_y"..y) ) ) local val if framed and T>0 then val = S.index(S.index(sinp,x+(Tf+xmin)),0,y) else val = S.index(sinp,x+(Tf+xmin),y ) end table.insert( pipelines, SR[y][x]:set(val) ) out[y*(-xmin+Tf)+x+1] = SR[y][x]:get() else -- x>-xmin local val if framed and T>0 then val = S.index(sinp,x+xmin) val = S.index(val,0,y) else val = S.index(sinp,x+xmin,y ) end out[y*(-xmin+Tf)+x+1] = val end x = x - 1 end end local finalOut if framed and T>0 then local results = {} for v=1,T do local thisV = {} for y=ymin,0 do local yidx = y-ymin for x = xmin,0 do local xidx = x-xmin table.insert(thisV,out[yidx*(-xmin+T)+xidx+(v-1)+1]) end end table.insert( results, S.cast( S.tuple( thisV ), types.array2d(A,-xmin+1,-ymin+1) ) ) end finalOut = S.cast( S.tuple( results ), rigel.lower(res.outputType) ) else finalOut = S.cast( S.tuple( out ), rigel.lower(res.outputType) ) end local CE if res.stateful then CE = S.CE("process_CE") systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", nil, S.parameter("reset",types.bool()) ) ) end systolicModule:addFunction( S.lambda("process", sinp, finalOut, "process_output", pipelines, nil, CE ) ) return systolicModule end return rigel.newFunction(res) end) -- T: the number of cycles to take to emit the stencil. IE T=4 => serialize the stencil and send it out over 4 cycles. modules.SSRPartial = memoize(function( A, T, xmin, ymin, stride, fullOutput, framed_orig, framedW_orig, framedH_orig, X ) err(T>=1,"SSRPartial: T should be >=1") assert(X==nil) local framed = framed_orig if framed==nil then framed=false end if stride==nil then local Weach = (-xmin+1)/T err(Weach==math.floor(Weach),"SSRPartial: requested parallelism does not divide stencil size. xmin=",xmin," ymin=",ymin," T=",T) stride=Weach end if fullOutput==nil then fullOutput=false end local res = {kind="SSRPartial", type=A, T=T, xmin=xmin, ymin=ymin, stride=stride, fullOutput=fullOutput, stateful=true } if framed then err(type(framedW_orig)=="number" or Uniform.isUniform(framedW_orig),"SSR: framedW must be uniform or number") err(type(framedH_orig)=="number" or Uniform.isUniform(framedH_orig),"SSR: framedH must be uniform or number") -- if T==0 then -- res.inputType = types.Seq( types.Par(types.array2d(A,1,-ymin+1)),framedW_orig,framedH_orig) -- res.outputType = types.Seq(types.Par(types.array2d(A,-xmin+1,-ymin+1)),framedW_orig,framedH_orig) -- else res.inputType = types.rv(types.ParSeq(types.array2d(types.array2d(A,1,-ymin+1),1),framedW_orig,framedH_orig)) res.outputType = types.rRvV(types.Seq(types.ParSeq(types.array2d(A,(-xmin+1)/T,-ymin+1),-xmin+1,-ymin+1),framedW_orig,framedH_orig)) -- end assert(fullOutput==false) else res.inputType = types.rv(types.Par(types.array2d(A,1,-ymin+1))) if fullOutput then res.outputType = types.rRvV(types.Par(types.array2d(A,(-xmin+1),-ymin+1))) else res.outputType = types.rRvV(types.Par(types.array2d(A,(-xmin+1)/T,-ymin+1))) end end res.sdfInput, res.sdfOutput = SDF{1,T},SDF{1,1} res.delay=0 res.name = sanitize("SSRPartial_"..tostring(A).."_T"..tostring(T).."_fullOutput"..tostring(fullOutput).."_framed"..tostring(framed_orig).."_framedW"..tostring(framedW_orig).."_framedH"..tostring(framedH_orig)) if terralib~=nil then res.terraModule = MT.SSRPartial(res,A, T, xmin, ymin, stride, fullOutput, framed ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp_orig = S.parameter("process_input", rigel.lower(res.inputType) ) local sinp= sinp_orig if framed then sinp = S.index(sinp_orig,0) end local P = T local shiftValues = {} local Weach = (-xmin+1)/P -- number of columns in each output local W = -xmin+1 for x=0,W-1 do table.insert( shiftValues, sinp( (W-1-x)*P) ) end local shifterOut, shifterPipelines, shifterResetPipelines, shifterReading = fpgamodules.addShifter( systolicModule, shiftValues, stride, P, DARKROOM_VERBOSE ) if fullOutput then shifterOut = concat2dArrays( shifterOut ) else shifterOut = concat2dArrays( J.slice( shifterOut, 1, Weach) ) end local processValid = S.parameter("process_valid",types.bool()) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp_orig, S.tuple{ shifterOut, processValid }, "process_output", shifterPipelines, processValid, CE) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", shifterResetPipelines,S.parameter("reset",types.bool())) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), shifterReading, "ready", {} ) ) return systolicModule end return rigel.newFunction(res) end) -- we could construct this out of liftHandshake, but this is a special case for when we don't need a fifo b/c this is always ready -- if nilhandshake is true, and f input type is nil, we produce type Handshake(nil)->Handshake(A) -- if nilhandshake is false or nil, and f input type is nil, we produce type nil->Handshake(A) -- Handshake(nil) provides a ready bit but no data, vs nil, which provides nothing. -- (nilhandshake also applies the same way to the output type) modules.makeHandshake = memoize(function( f, tmuxRates, nilhandshake, name, X ) assert( rigel.isFunction(f) ) if nilhandshake==nil then -- set nilhandshake=true by default if we are dealing with explicit trigger types nilhandshake = f.inputType:extractData():verilogBits()==0 or f.outputType:extractData():verilogBits()==0 end err( type(nilhandshake)=="boolean", "makeHandshake: nilhandshake must be nil or boolean") assert( X==nil ) local res = { kind="makeHandshake", fn = f, tmuxRates = tmuxRates } if tmuxRates~=nil then err(f.inputType:isrv() and f.inputType:deInterface():isData(),"makeHandshake fn input should be rvPar, but is: "..tostring(f.inputType)) err(f.outputType:isrv() and f.outputType:deInterface():isData(),"makeHandshake fn output should be rvPar, but is: "..tostring(f.outputType)) res.inputType = rigel.HandshakeTmuxed( f.inputType.over, #tmuxRates ) res.outputType = rigel.HandshakeTmuxed (f.outputType.over, #tmuxRates ) assert( SDFRate.isSDFRate(tmuxRates) ) res.sdfInput, res.sdfOutput = SDF(tmuxRates), SDF(tmuxRates) else err( f.inputType:isrv() or f.inputType==types.Interface(),"makeHandshake: fn '"..f.name.."' input type should be rv or null, but is "..tostring(f.inputType) ) err( f.outputType:isrv() or f.outputType==types.Interface(),"makeHandshake: fn '"..f.name.."' output type should be rv or null, but is "..tostring(f.outputType)) if f.inputType==types.Interface() and nilhandshake==true then res.inputType = rigel.HandshakeTrigger elseif f.inputType~=types.Interface() and f.inputType:is("StaticFramed") then res.inputType = types.HandshakeFramed( f.inputType.params.A, f.inputType.params.mixed, f.inputType.params.dims ) elseif f.inputType~=types.Interface() then res.inputType = rigel.Handshake(f.inputType.over) else res.inputType = types.Interface() end if f.outputType==types.Interface() and nilhandshake==true then res.outputType = rigel.HandshakeTrigger elseif f.outputType~=types.Interface() and f.outputType:is("StaticFramed") then res.outputType = types.HandshakeFramed( f.outputType.params.A, f.outputType.params.mixed, f.outputType.params.dims ) elseif f.outputType~=types.Interface() then res.outputType = rigel.Handshake(f.outputType.over) else res.outputType = types.Interface() end J.err( rigel.SDF==false or f.sdfInput~=nil, "makeHandshake: fn is missing sdfInput? "..f.name ) J.err( rigel.SDF==false or f.sdfOutput~=nil, "makeHandshake: fn is missing sdfOutput? "..f.name ) J.err( rigel.SDF==false or #f.sdfInput==1, "makeHandshake expects SDF input rate of 1") J.err( rigel.SDF==false or f.sdfInput[1][1]:eq(f.sdfInput[1][2]):assertAlwaysTrue(), "makeHandshake expects SDF input rate of 1, but is: "..tostring(f.sdfInput)) J.err( rigel.SDF==false or #f.sdfOutput==1, "makeHandshake expects SDF output rate of 1") J.err( rigel.SDF==false or f.sdfOutput[1][1]:eq(f.sdfOutput[1][2]):assertAlwaysTrue(), "makeHandshake of fn '"..f.name.."' expects SDF output rate of 1, but is: "..tostring(f.sdfOutput)) res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} end assert(res.inputType~=nil) err(type(f.delay)=="number","MakeHandshake fn is missing delay? ",f) if f.RVDelay~=nil then -- not sure why this should be needed, but whatever... res.delay = f.RVDelay+f.delay else res.delay = f.delay end res.stateful = (f.delay>0) or f.stateful -- for the shift register of valid bits if name~=nil then assert(type(name)=="string") res.name = name else res.name = J.sanitize("MakeHandshake_HST_"..tostring(nilhandshake).."_"..f.name) end res.requires = {} for inst,fnmap in pairs(f.requires) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.requires,{inst,fnname},1) end end res.provides = {} for inst,fnmap in pairs(f.provides) do for fnname,_ in pairs(fnmap) do J.deepsetweak(res.provides,{inst,fnname},1) end end if terralib~=nil then res.makeTerra = function() return MT.makeHandshake(res, f, tmuxRates, nilhandshake ) end end function res.makeSystolic() -- We _NEED_ to set an initial value for the shift register output (invalid), or else stuff downstream can get strange values before the pipe is primed local systolicModule = Ssugar.moduleConstructor(res.name):parameters({INPUT_COUNT=0,OUTPUT_COUNT=0}):onlyWire(true) local outputCount local SRdefault = false if tmuxRates~=nil then SRdefault = #tmuxRates end local srtype = rigel.extractValid(res.inputType) if res.inputType==types.Interface() then srtype = rigel.extractValid(res.outputType) end local SRMod = fpgamodules.shiftRegister( srtype, f.systolicModule:getDelay("process"), SRdefault, true ) local SR = systolicModule:add( SRMod:instantiate( J.sanitize("makeHSvalidBitDelay") ) ) local inner = systolicModule:add(f.systolicModule:instantiate("inner")) local pinp = S.parameter("process_input", rigel.lower(res.inputType) ) local rst = S.parameter("reset",types.bool()) local pipelines = {} local pready = S.parameter("ready_downstream", types.bool()) local CE = pready -- some modules may not require a CE (pure functions) local processCE = CE if f.systolicModule.functions.process.CE==nil then processCE=nil end local outvalid local out local inputNullary = f.inputType==types.Interface() local outputNullary = f.outputType==types.Interface() if inputNullary and outputNullary and nilhandshake==true then assert(false) -- NYI elseif inputNullary and nilhandshake==true then outvalid = SR:process( pinp, S.constant(true,types.bool()), CE) out = S.tuple({inner:process(nil,pinp,processCE), outvalid}) elseif inputNullary and nilhandshake==false then outvalid = SR:process(S.constant(true,types.bool()), S.constant(true,types.bool()), CE) --table.insert(pipelines,inner:process(nil,pinp,CE)) out = S.tuple({inner:process(nil,S.constant(true,types.bool()),processCE), outvalid}) elseif outputNullary and nilhandshake==true then outvalid = SR:process(S.index(pinp,1), S.constant(true,types.bool()), CE) out = outvalid table.insert(pipelines,inner:process(S.index(pinp,0),S.index(pinp,1), processCE)) elseif outputNullary and nilhandshake==false then table.insert(pipelines,inner:process(S.index(pinp,0),S.index(pinp,1), processCE)) else outvalid = SR:process(S.index(pinp,1), S.constant(true,types.bool()), CE) out = S.tuple({inner:process(S.index(pinp,0),S.index(pinp,1), processCE), outvalid}) end --[=[if DARKROOM_VERBOSE then local typelist = {types.bool(),rigel.lower(f.outputType), rigel.extractValid(res.outputType), types.bool(), types.bool(), types.uint(16), types.uint(16)} local str = "RST %d O %h OV %d readyDownstream %d ready %d outputCount %d expectedOutput %d" local lst = {rst, S.index(out,0), S.index(out,1), pready, pready, outputCount:get(), S.instanceParameter("OUTPUT_COUNT",types.uint(16)) } if res.inputType~=types.Interface() then table.insert(lst, S.index(pinp,1)) table.insert(typelist, rigel.extractValid(res.inputType)) str = str.." IV %d" end local printInst = systolicModule:add( S.module.print( types.tuple(typelist), str):instantiate("printInst") ) table.insert(pipelines, printInst:process( S.tuple(lst) ) ) end]=] if tmuxRates~=nil then --if DARKROOM_VERBOSE then table.insert(pipelines, outputCount:setBy(S.lt(outvalid,S.constant(#tmuxRates,types.uint(8))), S.__not(rst), CE) ) end else --if DARKROOM_VERBOSE then table.insert(pipelines, outputCount:setBy(outvalid, S.constant(true,types.bool()), CE) ) end end systolicModule:addFunction( S.lambda("process", pinp, out, "process_output", pipelines) ) local resetOutput if f.stateful then resetOutput = inner:reset(nil,rst) end local resetPipelines = {} table.insert( resetPipelines, SR:reset(nil,rst) ) --if DARKROOM_VERBOSE then table.insert( resetPipelines, outputCount:set(S.constant(0,types.uint(16)),rst,CE) ) end if res.stateful then systolicModule:addFunction( S.lambda("reset", S.parameter("rst",types.null()), resetOutput, "reset_out", resetPipelines,rst) ) end if res.inputType==types.null() and nilhandshake==false then systolicModule:addFunction( S.lambda("ready", pready, nil, "ready" ) ) elseif res.outputType==types.null() and nilhandshake==false then systolicModule:addFunction( S.lambda("ready", S.parameter("r",types.null()), S.constant(true,types.bool()), "ready" ) ) else systolicModule:addFunction( S.lambda("ready", pready, pready, "ready" ) ) end return systolicModule end local out = rigel.newFunction(res) return out end) -- promotes FIFO systolic module to handshake type. -- In the future, we'd like to make our type system powerful enough to be able to do this... local function promoteFifo(systolicModule) end -- nostall: unsafe -> ready always set to true -- W,H,T: used for debugging (calculating last cycle) -- csimOnly: hack for large fifos - don't actually allocate hardware -- VRLoad: make the load function be HandshakeVR -- VRStore: make the store function be HandshakeVR modules.fifo = memoize(function( A, size, nostall, W, H, T, csimOnly, VRLoad, SDFRate, VRStore, includeSizeFn, dbgname, X ) err( types.isType(A), "fifo: type must be type") err( A:isData() or A:isSchedule(),"fifo: type must be data type or schedule type") err( type(size)=="number", "fifo: size must be number") err( size >0,"fifo: size must be >0") err( size <=32768/2,"fifo: size must be <32768 (max items in a BRAM). size:",size) err(nostall==nil or type(nostall)=="boolean", "fifo: nostall should be nil or boolean") err(W==nil or type(W)=="number", "W should be nil or number") err(H==nil or type(H)=="number", "H should be nil or number") err(T==nil or type(T)=="number", "T should be nil or number") assert(csimOnly==nil or type(csimOnly)=="boolean") if csimOnly==nil then csimOnly=false end if VRLoad==nil then VRLoad=false end err( type(VRLoad)=="boolean","fifo: VRLoad should be boolean") if VRStore==nil then VRStore=false end err( type(VRStore)=="boolean","fifo: VRStore should be boolean") assert( dbgname==nil or type(dbgname)=="string" ) if SDFRate==nil then SDFRate=SDF{1,1} end err( SDF.isSDF(SDFRate),"modules.fifo: SDFRate must be nil or SDF rate") if includeSizeFn==nil then includeSizeFn=false end assert(X==nil) local storeFunction = {name="store", outputType=types.Interface(), sdfInput=SDFRate, sdfOutput=SDFRate, stateful=(csimOnly~=true), sdfExact=true, delay=0} if VRStore then storeFunction.inputType = types.HandshakeVR(A) else storeFunction.inputType = types.Handshake(A) end local loadFunction = {name="load", inputType=types.Interface(), sdfInput=SDFRate, sdfOutput=SDFRate, stateful=(csimOnly~=true), sdfExact=true, delay=1} if VRLoad then loadFunction.outputType = types.HandshakeVR(A) else loadFunction.outputType = types.Handshake(A) end if A==types.null() then storeFunction.inputType=rigel.HandshakeTrigger loadFunction.outputType=rigel.HandshakeTrigger end local storeRigelFn = rigel.newFunction(storeFunction) local loadRigelFn = rigel.newFunction(loadFunction) local addrBits = (math.ceil(math.log(size)/math.log(2)))+1 local sizeRigelFn if includeSizeFn then sizeRigelFn = rigel.newFunction{name="size",inputType=types.null(),outputType=types.uint(addrBits),sdfInput=SDF{1,1},sdfOutput=SDF{1,1},delay=0,stateful=(csimOnly~=true)} end local dbgMonitor = "" if false then dbgMonitor = [[ // debug monitor reg [31:0] totalCycles=32'd0; reg [31:0] stalledCycles=32'd0; reg [31:0] downstreamStalledCycles=32'd0; reg printed = 1'b1; always @(posedge CLK) begin if (reset) begin if (printed==1'b0 ) begin $display("|]]..J.verilogSanitizeInner(tostring(dbgname)).."|"..size.."|"..tostring(A)..[[|%0d|%0d|%0d", stalledCycles, downstreamStalledCycles, totalCycles ); end totalCycles <= 32'd0; stalledCycles <= 32'd0; downstreamStalledCycles <= 32'd0; printed <= 1'b1; end else begin printed <= 1'b0; totalCycles <= totalCycles+32'd1; if(store_ready==1'b0) begin stalledCycles <= stalledCycles + 32'd1; end if( load_ready_downstream==1'b0) begin downstreamStalledCycles <= downstreamStalledCycles + 32'd1; end end end ]] end if size==1 and (csimOnly==false) then local name = J.sanitize("OneElementFIFO_"..tostring(A).."_dbgname"..tostring(dbgname)) local vstr=[[module ]]..name..[[(input wire CLK, output wire []]..tostring(A:lower():verilogBits())..[[:0] load_output, input wire reset, output wire store_ready, input wire load_ready_downstream, input wire []]..tostring(A:lower():verilogBits())..[[:0] store_input); parameter INSTANCE_NAME="INST"; reg hasItem; reg []]..tostring(A:lower():verilogBits()-1)..[[:0] dataBuffer; wire store_valid; assign store_valid = store_input[]]..tostring(A:lower():verilogBits())..[[]; always @(posedge CLK) begin if (reset) begin hasItem <= 1'b0; end else begin if (store_valid && (load_ready_downstream || hasItem==1'b0) ) begin // input is valid and we can accept it hasItem <= 1'b1; dataBuffer <= store_input[]]..tostring(A:lower():verilogBits()-1)..[[:0]; end else if (load_ready_downstream) begin // buffer is being emptied hasItem <= 1'b0; end end end assign load_output = {hasItem,dataBuffer}; assign store_ready = (hasItem==1'b0)||load_ready_downstream; ]]..dbgMonitor..[[ endmodule ]] local mod = modules.liftVerilogModule(name, vstr, {load=loadRigelFn,store=storeRigelFn}, true) if terralib~=nil then mod.terraModule = MT.fifo( mod, storeRigelFn.inputType, loadRigelFn.outputType, A, 2, nostall, W, H, T, csimOnly, dbgname ) end return mod else local bytes = (size*A:verilogBits())/8 local name = sanitize("fifo_SIZE"..size.."_"..tostring(A).."_W"..tostring(W).."_H"..tostring(H).."_T"..tostring(T).."_BYTES"..tostring(bytes).."_nostall"..tostring(nostall).."_csimOnly"..tostring(csimOnly).."_VRLoad"..tostring(VRLoad).."_VRS"..tostring(VRStore).."_SZFN"..tostring(includeSizeFn).."_RATE"..tostring(SDFRate).."_dbgname"..tostring(dbgname)) local res = rigel.newModule{ kind="fifo", name=name, functions={store=storeRigelFn, load=loadRigelFn, size=sizeRigelFn}, stateful=(csimOnly~=true) } if terralib~=nil then res.terraModule = MT.fifo( res, storeRigelFn.inputType, loadRigelFn.outputType ,A, size, nostall, W, H, T, csimOnly, dbgname ) end local fifo if csimOnly then res.makeSystolic = function() return fpgamodules.fifonoop( A, addrBits, name ) end else res.makeSystolic = function() local C = require "generators.examplescommon" local s = C.automaticSystolicStub( res ) local allocatedItems local allocatedBits local addrBits local ramMod local ramInst local brammode if size<=128 then allocatedItems = 128 allocatedBits = A:lower():verilogBits() addrBits = 7 brammode=false ramMod = fpgamodules.sliceRamGen( allocatedBits ):complete() --if Ssugar.isModuleConstructor(ramMod) then ramMod = ramMod:complete() end ramInst = ramMod:instantiate("ram") s:add( ramInst ) local rd = ramInst.read( ramInst, S.constant(0,types.uint(addrBits)), S.constant(true,types.bool()), S.constant(true,types.bool()) ) s:lookupFunction("load"):addPipeline(rd) local wr = ramInst.write( ramInst, S.tuple{S.constant(0,types.uint(addrBits)),S.constant(0,types.bits(A:lower():verilogBits()))}, S.constant(true,types.bool()), S.constant(true,types.bool()) ) s:lookupFunction("store"):addPipeline(wr) else brammode=true allocatedItems = J.nearestPowerOf2(size) addrBits = math.log(allocatedItems)/math.log(2) local allocatedBytes = math.ceil(A:lower():verilogBits()/8) allocatedBits = allocatedBytes * 8 ramMod = fpgamodules.bramSDP( true, allocatedItems*allocatedBytes, allocatedBytes, allocatedBytes, nil, true ):complete() ramInst = ramMod:instantiate("ram") s:add( ramInst ) local rd = ramInst.read( ramInst, S.constant(0,types.uint(addrBits)), S.constant(true,types.bool()), S.constant(true,types.bool()) ) s:lookupFunction("load"):addPipeline(rd) local wr = ramInst.writeAndReturnOriginal( ramInst, S.tuple{S.constant(0,types.uint(addrBits)),S.constant(0,types.bits(allocatedBits))}, S.constant(true,types.bool()), S.constant(true,types.bool()) ) s:lookupFunction("store"):addPipeline(wr) end err(S.isModule(ramMod),"ram was not a systolic module? size:",size, " bits ",allocatedBits,ramMod) local verilog = {res:vHeader()} table.insert( verilog, ramMod:instanceToVerilogStart(ramInst) ) table.insert( verilog,[[ reg [31:0] readAddr; reg [31:0] writeAddr; wire [31:0] size; assign size = writeAddr-readAddr; assign store_ready = size < 32'd]]..size..[[; wire hasData; assign hasData = size>32'd0; wire reading; ]] ) if brammode then -- brams have a 1 cycle delay on read! we always queue up the next address asap, but if FIFO is empty, we do need to wait one cycle -- if bram is 'preloaded', this means that BRAM address is one ahead of actual readAddr, but ReadEnable hasn't been flipped yet -- this means output port of BRAM contains the next token we need (available immediately), and next cycle the next one is available -- -- another way to say this: readAddr is the address we want to read _this_ cycle. But ram will be a cycle behind. So if addr X is readAddr -- this cycle, X must have been the ram_readAddr the last time RE was true. -- -- to accomlish this, we have readAddrNext, which is basically running one ahead of readAddr, and is the next addr we need to queue up -- this is tricky to implement, b/c readAddrNext has to behave the same as readAddr (has to wrap the same, and FIFO size check has to happen the same way!) -- -- but: if you pretend readAddrNext basically follows the same rules as readAddr, it's just one ahead, the logic isn't actually too complex table.insert(verilog,[[ reg [31:0] readAddrNext; wire preloading; // this is basically like reading, but runs ahead wire hasDataNext; assign hasDataNext = (writeAddr-readAddrNext)>32'd0; assign preloading = hasDataNext && (load_ready_downstream || preloaded==1'b0); reg preloaded; wire load_valid; always @(posedge CLK) begin if ( reset ) begin preloaded <= 1'b0; readAddrNext <= 32'd0; end else begin if ( readAddr==32'd]]..(allocatedItems-1)..[[ && reading ) begin // time for pointers to wrap if( preloading ) begin readAddrNext <= readAddrNext - 32'd]]..(allocatedItems-1)..[[; preloaded <= 1'b1; end else begin readAddrNext <= readAddrNext - 32'd]]..allocatedItems..[[; preloaded <= 1'b0; end end else if( preloading ) begin readAddrNext <= readAddrNext + 32'd1; preloaded <= 1'b1; end else if (load_ready_downstream) begin // if load_ready_downstream is true, and somehow we aren't preloading, that means preload failed // ie: we need to introduce a cycle of delay preloaded <= 1'b0; end end //$display("FIFO ]]..size..[[ size:%d preloaded:%d preloading:%d ram_RE:%d readAddr:%3d ram_readAddr:%3d writeAddr:%3d load_valid:%d readDS:%d data:%d\n",size,preloaded, preloading, ram_RE, readAddr, ram_readAddr, writeAddr, load_valid, load_ready_downstream, load_output[]]..(A:extractData():verilogBits()-1)..[[:0] ); end assign ram_RE = preloading; //load_ready_downstream || ( preloaded==1'b0 ); assign ram_readAddr = readAddrNext[]]..(addrBits-1)..[[:0]; assign load_valid = preloaded; // ram buffer slot contains readAddr ]]) else table.insert(verilog,[[wire load_valid; assign load_valid = size>32'd0; assign ram_RE = load_ready_downstream; assign ram_readAddr = readAddr[]]..(addrBits-1)..[[:0]; ]]) end table.insert(verilog,[[assign load_output = {load_valid,ram_readOut[]]..(A:lower():verilogBits())..[[-1:0]}; assign reading = load_valid && load_ready_downstream; wire store_valid; assign store_valid = store_input[]]..(A:lower():verilogBits())..[[]; wire writing; assign writing = store_ready && store_valid; assign ram_WE = 1'b1; assign ram_]]..J.sel(brammode,"writeAndReturnOriginal","write")..[[_valid = writing; assign ram_writeAddrAndData = {]]..J.sel(brammode and A:lower():verilogBits()<J.upToNearest(8,A:lower():verilogBits()),tostring(J.upToNearest(8,A:lower():verilogBits())-A:lower():verilogBits()).."'d0,","")..[[store_input[]]..(A:lower():verilogBits()-1)..[[:0],writeAddr[]]..(addrBits-1)..[[:0]}; always @(posedge CLK) begin if (reset) begin readAddr <= 32'd0; writeAddr <= 32'd0; end else begin if ( readAddr==32'd]]..(allocatedItems-1)..[[ && reading ) begin // we need to wrap around readAddr <= 32'd0; if (writing) begin writeAddr <= writeAddr - 32'd]]..(allocatedItems-1)..[[; end else begin writeAddr <= writeAddr - 32'd]]..allocatedItems..[[; end end else begin if (reading) begin readAddr <= readAddr + 32'd1; end if (writing) begin writeAddr <= writeAddr + 32'd1; end end end //$display("size %d reading %d writing %d readAddr %d readDat %x writeAddr %d writeDat %x",size,reading,writing,readAddr, ram_readOut, writeAddr, ram_writeAddrAndData[71:8]); end ]]) if true then -- extra debug stuff table.insert(verilog,dbgMonitor) table.insert(verilog,[[ reg [31:0] numRead = 32'd0; reg [31:0] numWritten = 32'd0; always @(posedge CLK) begin if( reset) begin if( numRead!=numWritten ) begin $display("SEVERE WARNING: FIFO INPUTS/OUTPUTS DONT MATCH AT RESET. THIS MEANS SOME STATE WASNT FULLY CLEAR AT RESET TIME. CHECK PADSEQS. stored:%0d loaded:%0d ]]..J.verilogSanitizeInner(res.name)..[[",numWritten, numRead); end numRead <= 32'd0; numWritten <= 32'd0; end else begin if(store_valid && store_ready) begin numWritten <= numWritten + 32'd1; end if(load_valid && load_ready_downstream) begin numRead <= numRead + 32'd1; end if(numRead>numWritten) begin $display("ERROR: MORE OUTPUTS FROM FIFO THAN INPUTS!"); end end end ]]) end table.insert(verilog,[[ endmodule ]]) s:verilog(table.concat(verilog,"")) return s end end return res end assert(false) end) modules.triggerFIFO = memoize(function(ty) assert(ty==nil or ty:isSchedule()) local portType if ty==nil then portType=types.HandshakeTrigger else assert(ty:extractData():verilogBits()==0) portType = types.RV(ty) end local SDFRate = SDF{1,1} local storeFunction = rigel.newFunction{name="store", inputType=portType, outputType=types.null(), sdfInput=SDFRate, sdfOutput=SDFRate, stateful=true, sdfExact=true, delay=0} local loadFunction = rigel.newFunction{name="load", inputType=types.null(), outputType=portType, sdfInput=SDFRate, sdfOutput=SDFRate, stateful=true, sdfExact=true, delay=0} local name = J.verilogSanitize("TriggerFIFO_"..tostring(ty)) local res = rigel.newModule{ name=name, functions={store=storeFunction, load=loadFunction}, stateful=true } res.kind="fifo" if terralib~=nil then res.terraModule = MT.triggerFIFO( res, ty ) end function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) local vstr = res:vHeader()..[=[ reg [31:0] cnt; always @(posedge CLK) begin if (reset==1'b1) begin cnt <= 32'd0; end else if (store_ready==1'b1 && store_input==1'b1 && load_ready_downstream==1'b1) begin // do nothing! load&store in same cycle end else if (store_ready==1'b1 && store_input==1'b1) begin cnt <= cnt+32'd1; end else if ( load_ready_downstream==1'b1 && cnt>32'd0) begin cnt <= cnt-32'd1; end end assign store_ready = cnt<32'd4294967295; assign load_output = (cnt>32'd0) || (store_ready==1'b1 && store_input==1'b1); endmodule ]=] s:verilog(vstr) return s end return res end) modules.lut = memoize(function( inputType, outputType, values ) err( types.isType(inputType), "LUT: inputType must be type") rigel.expectBasic( inputType ) err( types.isType(outputType), "LUT: outputType must be type") rigel.expectBasic( outputType ) local inputCount = math.pow(2, inputType:verilogBits()) err( inputCount==#values and J.keycount(values)==inputCount, "values array has insufficient entries, has "..tonumber(#values).." but should have "..tonumber(inputCount)) for _,v in ipairs(values) do outputType:checkLuaValue(v) end local res = {kind="lut", inputType=inputType, outputType=outputType, values=values, stateful=false } res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay = 1 res.name = J.sanitize("LUT_"..tostring(inputType).."_"..(tostring(outputType)).."_"..(tostring(values)) ) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) -- bram can only read byte aligned? local inputBytes = math.ceil(inputType:verilogBits()/8) local lut = systolicModule:add( fpgamodules.bramSDP( true, inputCount*(outputType:verilogBits()/8), inputBytes, outputType:verilogBits()/8, values, true ):instantiate("LUT") ) --systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {},S.parameter("reset",types.bool())) ) local sinp = S.parameter("process_input", inputType ) local pipelines = {} -- needs to be driven, but set valid==false table.insert(pipelines, lut:writeAndReturnOriginal( S.tuple{sinp,S.constant(0,types.bits(inputBytes*8))},S.constant(false,types.bool())) ) systolicModule:addFunction( S.lambda("process",sinp, S.cast(lut:read(sinp),outputType), "process_output", pipelines, nil, S.CE("process_CE") ) ) return systolicModule end res = rigel.newFunction(res) if terralib~=nil then res.terraModule = MT.lut( res, inputType, outputType, values, inputCount ) end return res end) modules.reduce = memoize(function( f, W, H, X ) if rigel.isPlainFunction(f)==false then error("Argument to reduce must be a plain rigel function, but is: "..tostring(f)) end err( f.inputType:isrv(), "reduce: input function should be rv parallel") err( f.inputType:deInterface():isData(), "reduce: input function should be rv parallel") err( f.outputType:isrv(), "reduce: input function should be rv parallel") err( f.outputType:deInterface():isData(), "reduce: input function should be rv parallel") if f.inputType:deInterface():isTuple()==false or f.inputType:deInterface()~=types.tuple({f.outputType:deInterface(),f.outputType:deInterface()}) then error("Reduction function f must be of type {A,A}->A, but is type "..tostring(f.inputType).."->"..tostring(f.outputType)) end err(type(W)=="number", "reduce W must be number") err(type(H)=="number", "reduce H must be number") local ty=f.outputType:deInterface() err( X==nil,"reduce: too many arguments") local res if (W*H)==2 then local G = require "generators.core" local C = require "generators.examplescommon" return C.compose("ReduceArrayToTupleWrapper_"..f.name.."_W"..tostring(W).."_H"..tostring(H),f,G.ArrayToTuple,nil,types.rv( types.Par( types.array2d( ty, W, H ) ) ),SDF{1,1}) elseif (W*H)%2==0 then -- codesize reduction optimization local C = require "generators.examplescommon" local I = rigel.input( types.rv( types.Par( types.array2d( ty, W, H ) ) ) ) local ic = rigel.apply( "cc", C.cast( types.array2d( ty, W, H ), types.array2d( ty, W*H ) ), I) local ica = rigel.apply("ica", C.slice(types.array2d( ty, W*H ),0,(W*H)/2-1,0,0), ic) local a = rigel.apply("a", modules.reduce(f,(W*H)/2,1), ica) local icb = rigel.apply("icb", C.slice(types.array2d( ty, W*H ),(W*H)/2,(W*H)-1,0,0), ic) local b = rigel.apply("b", modules.reduce(f,(W*H)/2,1), icb) local fin = rigel.concat("conc", {a,b}) local out = rigel.apply("out", f, fin) res = modules.lambda("reduce_"..f.name.."_W"..tostring(W).."_H"..tostring(H), I, out) else res = {kind="reduce", fn = f, W=W, H=H} res.inputType = types.rv(types.Par(types.array2d( ty, W, H ))) res.outputType = types.rv(types.Par(ty)) res.stateful = f.stateful if f.stateful then print("WARNING: reducing with a stateful function - are you sure this is what you want to do?") end res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,1} res.delay = math.ceil(math.log(W*H)/math.log(2))*f.delay res.name = sanitize("reduce_"..f.name.."_W"..tostring(W).."_H"..tostring(H)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) --local resetPipelines = {} local sinp = S.parameter("process_input", res.inputType:deInterface() ) local t = J.map( J.range2d(0,W-1,0,H-1), function(i) return S.index(sinp,i[1],i[2]) end ) local i=0 local expr = J.foldt(t, function(a,b) local I = systolicModule:add(f.systolicModule:instantiate("inner"..i)) i = i + 1 return I:process(S.tuple{a,b}) end, nil ) local CE if f.delay>0 or f.stateful then CE = S.CE("process_CE") end systolicModule:addFunction( S.lambda( "process", sinp, expr, "process_output", nil, nil, CE ) ) return systolicModule end res = rigel.newFunction( res ) end if terralib~=nil then res.terraModule = MT.reduce(res,f,W,H) end return res end) -- takes T{Wv,Vh}->T modules.reduceSeq = memoize(function( f, Vw, Vh, framed, X ) err(type(Vw)=="number","reduceSeq: Vw should be number") --err(T<=1, "reduceSeq: T>1, T="..tostring(T)) err(Vw>=1,"reduceSeq: Vw should be >=1, but is: "..tostring(Vw)) if Vh==nil then Vh=1 end err(type(Vh)=="number","reduceSeq: Vh should be number") err(Vh>=1,"reduceSeq: Vh should be >=1") if framed==nil then framed=false end err( type(framed)=="boolean","reduceSeq: framed must be boolean" ) assert(X==nil) err( rigel.isPlainFunction(f), "reduceSeq: input should be plain rigel function" ) assert( f.inputType:isrv()) assert( f.inputType:deInterface():isData() ) assert( f.outputType:isrv()) assert( f.outputType:deInterface():isData() ) if f.inputType:deSchedule():isTuple()==false or f.inputType:deSchedule()~=types.tuple({f.outputType:deSchedule(),f.outputType:deSchedule()}) then error("Reduction function f must be of type {A,A}->A, but is type "..tostring(f.inputType).."->"..tostring(f.outputType)) end local res = {kind="reduceSeq", fn=f, Vw=Vw, Vh=Vh} res.inputType = types.rv(f.outputType:deSchedule()) if framed then res.inputType = types.rv(types.Seq( types.Par(f.outputType:deSchedule()), Vw, Vh )) end res.outputType = types.rvV(types.Par(f.outputType:deSchedule())) res.sdfInput, res.sdfOutput = SDF{1,1},SDF{1,Vw*Vh} res.stateful = true err( f.delay==0, "reduceSeq, function must be asynchronous (0 cycle delay)") res.delay = 0 res.name = J.sanitize("ReduceSeq_"..f.name.."_Vw"..tostring(Vw).."_Vh"..tostring(Vh)) if terralib~=nil then res.terraModule = MT.reduceSeq(res,f,Vw,Vh) end function res.makeSystolic() local del = f.systolicModule:getDelay("process") err( del == 0, "ReduceSeq function must have delay==0 but instead has delay of "..del ) local systolicModule = Ssugar.moduleConstructor(res.name) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(16),f.outputType,f.outputType}, "ReduceSeq "..f.systolicModule.name.." phase %d input %d output %d", true):instantiate("printInst") ) end local sinp = S.parameter("process_input", f.outputType:deSchedule() ) local svalid = S.parameter("process_valid", types.bool() ) local phase = systolicModule:add( Ssugar.regByConstructor( types.uint(16), fpgamodules.sumwrap(types.uint(16), (Vw*Vh)-1 ) ):CE(true):setReset(0):instantiate("phase") ) local pipelines = {} table.insert(pipelines, phase:setBy( S.constant(1,types.uint(16)) ) ) local out if Vw*Vh==1 then -- hack: Our reduce fn always adds two numbers. If we only have 1 number, it won't work! just return the input. out = sinp else local sResult = systolicModule:add( Ssugar.regByConstructor( f.outputType:deSchedule(), f.systolicModule ):CE(true):hasSet(true):instantiate("result") ) table.insert( pipelines, sResult:set( sinp, S.eq(phase:get(), S.constant(0, types.uint(16) ) ):disablePipelining() ) ) out = sResult:setBy( sinp, S.__not(S.eq(phase:get(), S.constant(0, types.uint(16) ) )):disablePipelining() ) end if DARKROOM_VERBOSE then table.insert(pipelines, printInst:process( S.tuple{phase:get(),sinp,out} ) ) end local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.tuple{ out, S.eq(phase:get(), S.constant( (Vw*Vh)-1, types.uint(16))) }, "process_output", pipelines, svalid, CE) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {phase:reset()}, S.parameter("reset",types.bool())) ) return systolicModule end return rigel.newFunction( res ) end) -- takes rv(T[Vw,Vh;W,H})->rvV(T) modules.reduceParSeq = memoize(function( f, Vw, Vh, W, H, X ) assert(W%Vw==0) assert(H%Vh==0) local res = modules.compose("ReduceParSeq_f"..f.name.."_Vw"..tostring(Vw).."_Vh"..tostring(Vh).."_W"..tostring(W).."_H"..tostring(H),modules.reduceSeq(f,W/Vw,H/Vh,true),modules.flatmap(modules.reduce(f,Vw,Vh),Vw,Vh,W,H,0,0,W/Vw,H/Vh)) return res end) -- surpresses output if we get more then _count_ inputs modules.overflow = memoize(function( A, count ) rigel.expectBasic(A) err( count<2^32-1, "overflow: outputCount must not overflow") -- SDF rates are not actually correct, b/c this module doesn't fit into the SDF model. -- But in theory you should only put this at the very end of your pipe, so whatever... local res = {kind="overflow", A=A, inputType=types.rv(types.Par(A)), outputType=types.rvV(types.Par(A)), stateful=true, count=count, sdfInput=SDF{1,1}, sdfOutput=SDF{1,1}, delay=0} if terralib~=nil then res.terraModule = MT.overflow(res,A,count) end res.name = J.sanitize("Overflow_"..count.."_"..tostring(A)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local cnt = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.incIf(1,types.uint(32))):CE(true):setReset(0):instantiate("cnt") ) local sinp = S.parameter("process_input", A ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.tuple{ sinp, S.lt(cnt:get(), S.constant( count, types.uint(32))) }, "process_output", {cnt:setBy(S.constant(true,types.bool()))}, nil, CE ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {cnt:reset()}, S.parameter("reset",types.bool())) ) return systolicModule end return rigel.newFunction( res ) end) -- provides fake output if we get less then _count_ inputs after _cyclecount_ cycles -- if thing thing is done before tooSoonCycles, throw an assert -- waitForValid: don't actually start counting cycles until we see one valid input -- (if false, cycle count starts at beginning of time) -- overflowValue: what value should we emit when we overflow? -- ratio: usually, should just be 1->1 rate, but this allows us to do ratio->1 rate. (doesn't actually affect behavior) modules.underflow = memoize(function( A, count, cycles, upstream, tooSoonCycles, waitForValid, overflowValue, ratio, X ) rigel.expectBasic(A) err( type(count)=="number", "underflow: count must be number" ) err( type(cycles)=="number", "underflow: cycles must be number" ) err( cycles==math.floor(cycles),"cycles must be an integer") err( type(upstream)=="boolean", "underflow: upstream must be bool" ) err( tooSoonCycles==nil or type(tooSoonCycles)=="number", "tooSoonCycles must be nil or number" ) if overflowValue~=nil then A:checkLuaValue(overflowValue) end err( X==nil, "underflow: too many arguments" ) assert(count<2^32-1) err(cycles<2^32-1,"cycles >32 bit:"..tostring(cycles)) -- SDF rates are not actually correct, b/c this module doesn't fit into the SDF model. -- But in theory you should only put this at the very end of your pipe, so whatever... local res = {kind="underflow", A=A, inputType=rigel.Handshake(A), outputType=rigel.Handshake(A), stateful=true, count=count, sdfOutput=SDF{1,1}, delay=0, upstream = upstream, tooSoonCycles = tooSoonCycles} res.sdfInput = SDF{1,1} if ratio~=nil then assert(SDF.isSDF(ratio)) res.sdfInput = ratio end if terralib~=nil then res.terraModule = MT.underflow(res, A, count, cycles, upstream, tooSoonCycles, waitForValid, overflowValue ) end res.name = sanitize("Underflow_A"..tostring(A).."_count"..count.."_cycles"..cycles.."_toosoon"..tostring(tooSoonCycles).."_US"..tostring(upstream)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor( res.name ):parameters({INPUT_COUNT=0,OUTPUT_COUNT=0}):onlyWire(true) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(32),types.uint(32),types.bool()}, "outputCount %d cycleCount %d outValid"):instantiate("printInst") ) end local outputCount = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.incIfWrap(types.uint(32),count-1,1) ):CE(true):setReset(0):instantiate("outputCount") ) -- NOTE THAT WE Are counting cycles where downstream_ready == true local cycleCount = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.incIfWrap(types.uint(32),cycles-1,1) ):CE(true):setReset(0):instantiate("cycleCount") ) -- are we in fixup mode? local fixupReg = systolicModule:add( Ssugar.regByConstructor( types.uint(1), fpgamodules.incIf(1,types.uint(1)) ):CE(true):setReset(0):instantiate("fixupReg") ) local countingReg if waitForValid then -- countingReg: if 1, we should count cycles, if 0, we're waiting until we see a valid countingReg = systolicModule:add( Ssugar.regByConstructor( types.uint(1), fpgamodules.incIf(1,types.uint(1)) ):CE(true):setReset(0):instantiate("countingReg") ) end local rst = S.parameter("reset",types.bool()) local pinp = S.parameter("process_input", rigel.lower(res.inputType) ) local pready = S.parameter("ready_downstream", types.bool()) local pvalid = S.index(pinp,1) local pdata = S.index(pinp,0) --local fixupMode = S.gt(cycleCount:get(),S.constant(cycles,types.uint(32))) local fixupMode = S.eq(fixupReg:get(),S.constant(1,types.uint(32))) local CE = pready local CE_cycleCount = CE if upstream then CE = S.__or(CE,fixupMode) CE_cycleCount = S.constant(true,types.bool()) end local pipelines = {} table.insert( pipelines, outputCount:setBy(S.__and(pready,S.__or(pvalid,fixupMode)), S.constant(true,types.bool()), CE) ) local cycleCountCond = S.__not(fixupMode) if waitForValid then cycleCountCond = S.__and(cycleCountCond,S.eq(countingReg:get(),S.constant(1,types.uint(1)))) end table.insert( pipelines, cycleCount:setBy(cycleCountCond, S.constant(true,types.bool()), CE_cycleCount) ) local cycleCountLast = S.eq(cycleCount:get(),S.constant(cycles-1,types.uint(32))) local outputCountLast = S.eq(outputCount:get(),S.constant(count-1,types.uint(32))) table.insert( pipelines, fixupReg:setBy(S.__or(cycleCountLast,outputCountLast), S.constant(true,types.bool()), CE_cycleCount) ) if waitForValid then table.insert( pipelines, countingReg:setBy(S.__or(S.__and(pvalid,S.__not(cycleCountCond)),S.__and(outputCountLast,fixupMode)), S.constant(true,types.bool()), CE) ) end local outData if A:verilogBits()==0 then outData = pdata else local DEADBEEF = 4022250974 -- deadbeef if upstream then DEADBEEF = 3737169374 end -- deadc0de local fixupValue = S.cast(S.constant(math.min(DEADBEEF,math.pow(2,A:verilogBits())-1),types.bits(A:verilogBits())),A) if overflowValue~=nil then fixupValue = S.constant(overflowValue,A) end outData = S.select(fixupMode,fixupValue,pdata) end local outValid = S.__or(S.__and(fixupMode,S.lt(outputCount:get(),S.constant(count,types.uint(32)))),S.__and(S.__not(fixupMode),pvalid)) if tooSoonCycles~=nil then local asstInst = systolicModule:add( S.module.assert( "pipeline completed eariler than expected", true, false ):instantiate("asstInst") ) local tooSoon = S.eq(cycleCount:get(),S.constant(tooSoonCycles,types.uint(32))) tooSoon = S.__and(tooSoon,S.ge(outputCount:get(),S.constant(count,types.uint(32)))) table.insert( pipelines, asstInst:process(S.__not(tooSoon),S.constant(true,types.bool()),CE) ) -- ** throw in valids to mess up result -- just raising an assert doesn't work b/c verilog is dumb outValid = S.__or(outValid,tooSoon) end if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process(S.tuple{outputCount:get(),cycleCount:get(),outValid}) ) end systolicModule:addFunction( S.lambda("process", pinp, S.tuple{outData,outValid}, "process_output", pipelines) ) local resetPipelines = {} table.insert( resetPipelines, outputCount:reset(nil,rst) ) table.insert( resetPipelines, cycleCount:reset(nil,rst) ) table.insert( resetPipelines, fixupReg:reset(nil,rst) ) if waitForValid then table.insert( resetPipelines, countingReg:reset(nil,rst) ) end systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "reset_out", resetPipelines,rst) ) local readyOut = pready if upstream then readyOut = S.__or(pready,fixupMode) end systolicModule:addFunction( S.lambda("ready", pready, readyOut, "ready" ) ) return systolicModule end return rigel.newFunction( res ) end) modules.underflowNew = memoize(function(ty,cycles,count) err( types.isType(ty), "underflowNew: type must be rigel type" ) err( types.isBasic(ty),"underflowNew: input should be basic, but is: "..tostring(ty) ) local res = {kind="underflowNew"} res.inputType = types.Handshake(ty) res.outputType = types.Handshake(ty) res.sdfInput = SDF{1,1} res.sdfOutput = SDF{1,1} res.stateful=true res.delay=0 res.name = sanitize("UnderflowNew_"..tostring(ty).."_cycles"..tostring(cycles).."_CNT"..tostring(count)) if terralib~=nil then res.terraModule = MT.underflowNew( res, ty, cycles, count ) end local DEADCYCLES = 1024; function res.makeSystolic() local vstring = [[ module ]]..res.name..[[(input wire CLK, input wire reset, input wire []]..(ty:verilogBits())..[[:0] process_input, output wire []]..(ty:verilogBits())..[[:0] process_output, input wire ready_downstream, output wire ready); parameter INSTANCE_NAME="INST"; reg [31:0] remainingItems = 32'd0; reg [31:0] remainingCycles = 32'd0; reg [31:0] deadCycles = 32'd0; wire validIn; assign validIn = process_input[]]..(ty:verilogBits())..[[]; wire outtaTime; assign outtaTime = (remainingCycles <= remainingItems) && (remainingItems>32'd1); wire firstItem; assign firstItem = remainingItems==32'd0 && remainingCycles==32'd0 && deadCycles==32'd0 && validIn; // write out a final item in exactly cycles+DEADCYCLES cycles wire lastWriteOut; assign lastWriteOut = (deadCycles==32'd1) && (remainingCycles==32'd0); wire validOut; assign validOut = (remainingItems>32'd1 && validIn) || firstItem || outtaTime || lastWriteOut; wire []]..(ty:verilogBits()-1)..[[:0] outData; assign outData = validIn?process_input[]]..(ty:verilogBits()-1)..[[:0]:(]]..(ty:verilogBits())..[['d0); wire lastItem; assign lastItem = remainingItems==32'd2 && validOut; assign process_output = { validOut, outData}; assign ready = ready_downstream || outtaTime; always @(posedge CLK) begin if (reset) begin remainingItems <= 32'd0; remainingCycles <= 32'd0; deadCycles <= 32'd0; end else if (ready_downstream) begin if(firstItem) begin remainingItems <= 32'd]]..(count-1)..[[; remainingCycles <= 32'd]]..(cycles-1)..[[; end else if(lastItem) begin remainingItems <= 32'd1; deadCycles <= 32'd]]..DEADCYCLES..[[; if (remainingCycles>32'd0) begin remainingCycles <= remainingCycles-32'd1; end end else begin if (deadCycles>32'd0 && remainingCycles==32'd0) begin deadCycles <= deadCycles-32'd1; end if (remainingCycles>32'd0) begin remainingCycles <= remainingCycles-32'd1; end if (validOut) begin remainingItems <= remainingItems - 32'd1; end end end else begin // count down cycles even if not ready if (remainingCycles>32'd0) begin remainingCycles <= remainingCycles-32'd1; end end // if( lastItem || lastWriteOut || firstItem || outtaTime ) begin // $display("firstItem:%d lastItem:%d lastWriteOut:%d deadCycles:%d validOut:%d outtaTime:%d remainingItems:%d remainingCycles:%d readyDS:%d validIn:%d CNT:%d", firstItem, lastItem, lastWriteOut, deadCycles,validOut,outtaTime,remainingItems, remainingCycles, ready_downstream, validIn, CNT); // end end endmodule ]] local fns = {} fns.reset = S.lambda( "reset", S.parameter("resetinp",types.null()), S.null(), "resetout",nil,S.parameter("reset",types.bool())) local inp = S.parameter("process_input",types.lower(res.inputType)) fns.process = S.lambda("process",inp,S.tuple{ S.constant(ty:fakeValue(),ty), S.constant(true,types.bool()) }, "process_output") fns.process.isPure = function() return false end local downstreamReady = S.parameter("ready_downstream", types.bool()) fns.ready = S.lambda("ready", downstreamReady, downstreamReady, "ready" ) local ToVarlenSys = systolic.module.new(res.name, fns, {}, true,nil, vstring,{process=0,reset=0}) return ToVarlenSys end return rigel.newFunction(res) end) -- record the # of cycles needed to complete the computation, and write it into the last axi burst -- Note that this module _does_not_ wait until it sees the first token to start counting. It -- starts counting immediately after reset. This is so that it includes startup latency in cycle count. modules.cycleCounter = memoize(function( A, count, X ) rigel.expectBasic(A) J.err( type(count)=="number","cycleCounter: count must be number" ) J.err( X==nil, "cycleCounter: too many arguments") assert(count<2^32-1) -- # of cycles we need to write out metadata local padCount = (128*8) / A:verilogBits() -- SDF rates are not actually correct, b/c this module doesn't fit into the SDF model. -- But in theory you should only put this at the very end of your pipe, so whatever... local res = {kind="cycleCounter", A=A, inputType=rigel.Handshake(A), outputType=rigel.Handshake(A), stateful=true, count=count, sdfInput=SDF{count,count+padCount}, sdfOutput=SDF{1,1}, delay=0} res.name = sanitize("CycleCounter_A"..tostring(A).."_count"..count) if terralib~=nil then res.terraModule = MT.cycleCounter(res,A,count) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor( res.name ):parameters({INPUT_COUNT=0,OUTPUT_COUNT=0}):onlyWire(true) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( types.tuple{types.uint(32),types.uint(32),types.bool(),types.bool()}, "cycleCounter outputCount %d cycleCount %d outValid %d metadataMode %d"):instantiate("printInst") ) end local outputCount = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.incIfWrap(types.uint(32),count+padCount-1,1) ):CE(true):setReset(0):instantiate("outputCount") ) local cycleCount = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.incIf(1,types.uint(32),false) ):CE(false):setReset(0):instantiate("cycleCount") ) local rst = S.parameter("reset",types.bool()) local pinp = S.parameter("process_input", rigel.lower(res.inputType) ) local pready = S.parameter("ready_downstream", types.bool()) local pvalid = S.index(pinp,1) local pdata = S.index(pinp,0) local done = S.ge(outputCount:get(),S.constant(count,types.uint(32))) local metadataMode = done local CE = pready local pipelines = {} table.insert( pipelines, outputCount:setBy(S.__and(pready,S.__or(pvalid,metadataMode)), S.constant(true,types.bool()), CE) ) table.insert( pipelines, cycleCount:setBy(S.__not(done), S.constant(true,types.bool())) ) local outData if padCount == 16 then local cycleOutput = S.tuple{cycleCount:get(),cycleCount:get()} cycleOutput = S.cast(cycleOutput, types.bits(A:verilogBits())) outData = S.select(metadataMode,S.cast(cycleOutput,A),pdata) else -- degenerate case: not axi bus size. Just return garbage outData = S.select(metadataMode,S.cast(S.constant(0,types.bits(A:verilogBits())),A),pdata) end local outValid = S.__or(metadataMode,pvalid) if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process(S.tuple{outputCount:get(),cycleCount:get(),outValid,metadataMode}) ) end systolicModule:addFunction( S.lambda("process", pinp, S.tuple{outData,outValid}, "process_output", pipelines) ) local resetPipelines = {} table.insert( resetPipelines, outputCount:reset(nil,rst) ) table.insert( resetPipelines, cycleCount:reset(nil,rst) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "reset_out", resetPipelines,rst) ) local readyOut = S.__and(pready,S.__not(metadataMode)) systolicModule:addFunction( S.lambda("ready", pready, readyOut, "ready" ) ) return systolicModule end return rigel.newFunction( res ) end) -- this takes in a darkroom IR graph and normalizes the input SDF rate so that -- it obeys our constraints: (1) neither input or output should have bandwidth (token count) > 1 -- and (2) no node should have SDF rate > 1 local function lambdaSDFNormalize( input, output, name, X ) assert( X==nil, "lambdaSDFNormalize: too many arguments") assert( type(name)=="string") if input~=nil and input.sdfRate~=nil then err( SDFRate.isSDFRate(input.sdfRate),"SDF input rate is not a valid SDF rate") for k,v in pairs(input.sdfRate) do err(v=="x" or v[1]/v[2]<=1, "error, lambda declared with input BW > 1") end end local extreme = output:sdfExtremeRate(true,true) local sdfMaxRate, maxNode = extreme[1], extreme[2] if Uniform(sdfMaxRate[1]):eq(0):assertAlwaysTrue() then output:visitEach(function(n) print(n) end) J.err( false,"Error: max utilization of pipeline is 0! Something weird must have happened. Function:",name," due to node: ", maxNode) end local scaleFactor = SDFRate.fracInvert(sdfMaxRate) --if DARKROOM_VERBOSE then print("NORMALIZE, sdfMaxRate", SDFRate.fracToNumber(sdfMaxRate),"outputBW", SDFRate.fracToNumber(outputBW), "scaleFactor", SDFRate.fracToNumber(scaleFactor)) end local newInput local newOutput = output:process( function(n,orig) if n.kind=="input" then err( n.id==input.id, "lambdaSDFNormalize: unexpected input node. input node is not the declared module input." ) local orig = n.rate n.rate = SDF(SDFRate.multiply(n.rate,scaleFactor[1],scaleFactor[2])) assert( SDFRate.isSDFRate(n.rate)) if n.rate:allLE1()==false then -- this is kind of a hack? not all input rates will affect a module, so make sure we never -- end up with an input rate >1 local tr = n.rate:largest() n.rate = SDF(SDFRate.multiply(n.rate,tr[1][2],tr[1][1])) assert( SDFRate.isSDFRate(n.rate)) end if orig:le(n.rate)==false then print("* Warning: ",name," requested rate:",orig," but solved rate was:", n.rate) --print(maxNode) end newInput = rigel.newIR(n) return newInput elseif n.kind=="apply" and #n.inputs==0 then -- for nullary modules, we sometimes provide an explicit SDF rate, to get around the fact that we don't solve for SDF rates bidirectionally n.rate = SDF(SDFRate.multiply(n.rate, scaleFactor[1], scaleFactor[2] )) return rigel.newIR(n) elseif n.kind=="applyMethod" then n.rate = SDF(SDFRate.multiply(n.rate, scaleFactor[1], scaleFactor[2] )) return rigel.newIR(n) else return rigel.newIR(n) end end) if (input~=nil)~=(newInput~=nil) then print("lambdaSDFNormalize warning: declared input was not actually used anywhere in function '"..name.."'?" ) end return newInput, newOutput end -- check to make sure we have FIFOs in diamonds -- we check for fifos whenever we have fan in. One one exception is: -- if all branches into the fan in trace directly to an input (not through a fan out), we consider it ok. -- ie: that is basically a fan-in module itself, which we will check for later. local function checkFIFOs( output, moduleName, X ) assert( X==nil ) assert( type(moduleName)=="string" ) -- does this node's inputs trace directly to an input node, NOT through a fan-out? (ie only through nodes with 1 in, 1 out) local traceToInput traceToInput = J.memoize(function(n) local res if n.kind=="concat" then res = true for _,i in ipairs(n.inputs) do if traceToInput(i)==false then res=false end end elseif #n.inputs==0 then res = true -- this is an input or nullary module elseif n.kind=="apply" and n.fn.fifoStraightThrough==true and n.fn.inputType:streamCount()==n.fn.outputType:streamCount() then res = traceToInput(n.inputs[1]) elseif #n.inputs>1 or types.streamCount(n.type)>1 then res = false else assert(#n.inputs==1 and types.streamCount(n.type)==1 ) res = traceToInput(n.inputs[1]) end return res end) return output:visitEach( function(n, arg) local res = {} if n.kind=="input" then res = J.broadcast(false,types.streamCount(n.type)) elseif n.kind=="apply" or (n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module)) then local fn = n.fn if n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module) then fn = n.inst.module end if #n.inputs==0 then assert(false) elseif fn.inputType:streamCount()<=1 and fn.outputType:streamCount()<=1 then if fn.outputType:streamCount()==0 then res = {} else res = {fn.fifoed or arg[1][1]} end elseif fn.inputType:streamCount()==1 and fn.outputType:streamCount()>1 then -- always consider these to be fan outs res = J.broadcast( false, n.type.size[1]*n.type.size[2] ) -- clear fifo flag on fan-out elseif fn.inputType:streamCount()>1 and fn.outputType:streamCount()==1 then -- always consider these to be fan ins assert(#arg==1) assert(#arg[1]==types.streamCount(fn.inputType) ) local allStreamsTraceToInput = traceToInput(n.inputs[1]) local allFIFOed = true for i=1,types.streamCount(fn.inputType) do J.err( fn.disableFIFOCheck==true or arg[1][i] or allStreamsTraceToInput, "CheckFIFOs: branch in a diamond is missing FIFO! (input stream idx ",i-1,". ",types.streamCount(fn.inputType)," input streams, to fn:",fn.name,") inside function: ",moduleName," ", n.loc) allFIFOed = allFIFOed and arg[1][i] end -- Is this right???? if we got this far, we did have a fifo along this brach... res = J.broadcast(allFIFOed,types.streamCount(n.type)) elseif fn.inputType:streamCount()==fn.outputType:streamCount() and fn.fifoStraightThrough then -- sort of a hack: we marked this function to indicate that streams pass straight through, so we can just propagate signals res = arg[1] else J.err(false, "unknown fn fifo behavior? ",fn.name," type:",fn.inputType,"->",fn.outputType," inputCount:",#n.inputs," inputStreamCount:",fn.inputType:streamCount()," outputStreamCount:",fn.outputType:streamCount() ) end elseif n.kind=="applyMethod" then assert(rigel.isModule(n.inst.module)) if n.fnname=="load" and n.inst.module.kind=="fifo" then res = {true} else res = J.broadcast(false, types.streamCount(n.inst.module.functions[n.fnname].outputType) ) end elseif n.kind=="selectStream" then assert(#arg==1) res = {arg[1][n.i+1]} elseif n.kind=="concat" or n.kind=="concatArray2d" then for i=1,#n.inputs do if #arg[i]>=1 then assert(#arg[i]==1) res[i] = arg[i][1] end end elseif n.kind=="statements" then res = arg[1] elseif n.kind=="constant" then assert(false) -- should not appear in RV graphs --res = {} else print("NYI ",n.kind) assert(false) end J.err( type(res)=="table", "checkFIFOs bad res ",n ) J.err( #res == types.streamCount(n.type), "checkFIFOs error (res:",#res,",streamcount:",types.streamCount(n.type),",type:",n.type,")- ",n ) return res end) end -- this will go through the module/instances, and collect list of provided/required ports that are not tied down local function collectProvidesRequires( moduleName, output, instanceMap ) -- instance->fnlist local provides = {} local requires = {} local function addDependencies(mod) for inst,fnmap in pairs(mod.requires) do if requires[inst]==nil then requires[inst] = {} end for fnname,_ in pairs(fnmap) do local fn = inst.module.functions[fnname] J.err( requires[inst][fnname]==nil or fn.inputType==types.Interface(), "Multiple modules require the same function? "..inst.name..":"..fnname) requires[inst][fnname] = 1 end end for inst,fnmap in pairs(mod.provides) do if provides[inst]==nil then provides[inst] = {} end for fnname,_ in pairs(fnmap) do J.err( requires[inst][fnname]==nil, "Multiple modules provide the same function? "..inst.name..":"..fnname) provides[inst][fnname] = 1 end end end for inst,_ in pairs(instanceMap) do addDependencies(inst.module) if rigel.isModule(inst.module) then -- all fns in this module should be added to provides list for fnname,fn in pairs(inst.module.functions) do J.deepsetweak(provides,{inst,fnname},1) end end end -- collect other instances refered to by the fn code output:visitEach( function(n) if n.kind=="applyMethod" then -- *** just because we called one fn on an inst, doesn't mean we need to include the whole thing if requires[n.inst]==nil then requires[n.inst]={} end J.err( requires[n.inst][n.fnname]==nil, "Multiple modules require the same function? "..n.inst.name..":"..n.fnname) requires[n.inst][n.fnname] = 1 elseif n.kind=="apply" then addDependencies(n.fn) end end) return provides, requires end local function checkInstTables( moduleName, output, instanceMap, provides, requires, userInstanceMap) -- purely checking for inst,_ in pairs(instanceMap) do for rinst,rfnmap in pairs(inst.module.requires) do for rfn,_ in pairs(rfnmap) do err( instanceMap[rinst]~=nil or (requires[rinst]~=nil and requires[rinst][rfn]~=nil), "Instance '"..inst.name.."' requires "..rinst.name..":"..rfn.."(), but this is not in requires list or internal instance list?" ) --err( (externalInstances[ic.instance]~=nil and externalInstances[ic.instance][ic.functionName]~=nil) or instanceMap[ic.instance]~=nil,"Instance '"..inst.name.."' requires "..ic.instance.name..":"..ic.functionName..", but this is not in external or internal instances list?" ) --local fn = ic.instance.module.functions[ic.functionName] --if types.isHandshakeAny(fn.inputType) or types.isHandshakeAny(fn.outputType) then -- err( (externalInstances[ic.instance]~=nil and externalInstances[ic.instance][ic.functionName.."_ready"]~=nil) or (instanceMap[ic.instance]~=nil),"Instance '"..inst.name.."' requires "..ic.instance.name..":"..ic.functionName.."_ready(), but this is not in external or internal instances list?" ) --end end end end -- checking for inst,_ in pairs(userInstanceMap) do if requires[inst]~=nil then err( false, "The instance '"..inst.name.."' of module '"..inst.module.name.."' that the user explicitly included in module '"..moduleName.."' somehow ended up getting set as external? fnlist: "..table.concat(J.invertAndStripKeys(requires[inst]),",") ) end end for einst,_ in pairs(requires) do err( instanceMap[einst]==nil, "External instance '"..einst.name.."' is somehow also in instance list?") end for inst,_ in pairs(instanceMap) do err( requires[inst]==nil, "Instance '"..inst.name.."' is somehow also in external instance list?") end local usedInstances = {} output:visitEach( function(n) if n.kind=="applyMethod" then usedInstances[n.inst] = 1 elseif n.kind=="apply" then end end) -- it's OK for the instance to not be used if user explicitly placed it there... for inst,_ in pairs(instanceMap) do err( usedInstances[inst]~=nil or userInstanceMap[inst]~=nil, "Instance '"..inst.name.."' was not used? inside module '"..moduleName.."'") end for inst,_ in pairs(usedInstances) do err( instanceMap[inst]~=nil or requires[inst]~=nil, "Instance '"..inst.name.."' was used in function '"..moduleName.."', but is not in instance map or requires map?") end end local function collectInstances( moduleName, output, userInstanceMap ) assert( type(userInstanceMap)=="table" ) -- add instances to instance list that are fully resolved -- (ie, all their dependencies and provided functions are fully tied down) -- collect set of all provides/requires in the module (some may be tied down!) local provides, requires = collectProvidesRequires( moduleName, output, userInstanceMap ) -- delete matched provides/requires connections, and add fully wired modules to instance map local finalRequires = {} local finalProvides = {} -- clear matching connections -- NOTE: even if we delete everything out of FN list, we keep an empty FN list around! -- this is how we detect tied down instances for instance,fnmap in pairs(requires) do if finalRequires[instance]==nil then finalRequires[instance]={} end for fn,_ in pairs(fnmap) do -- add anything not tied down if provides[instance]==nil or provides[instance][fn]==nil then finalRequires[instance][fn]=1 end end end for instance,fnmap in pairs(provides) do if finalProvides[instance]==nil then finalProvides[instance]={} end for fn,_ in pairs(fnmap) do if requires[instance]==nil or requires[instance][fn]==nil then finalProvides[instance][fn]=1 end end end -- anything in final requires/provides that has no fns in list is tied down local finalFinalRequires = {} local finalFinalProvides = {} local instanceMap = {} for inst,_ in pairs(userInstanceMap) do instanceMap[inst]=1 end for inst,fnmap in pairs(finalRequires) do -- anything explicitly added has all requirements satisfied... if (J.keycount(fnmap)==0 and J.keycount(finalProvides[inst])==0) or userInstanceMap[inst]~=nil then -- tied down. add to Instance Map instanceMap[inst] = 1 else for fn,_ in pairs(fnmap) do J.deepsetweak(finalFinalRequires,{inst,fn},1) end end end for inst,fnmap in pairs(finalProvides) do if J.keycount(fnmap)==0 and J.keycount(finalRequires[inst])==0 then -- tied down. add to Instance Map instanceMap[inst] = 1 else for fn,_ in pairs(fnmap) do J.deepsetweak(finalFinalProvides,{inst,fn},1) end end end checkInstTables( moduleName, output, instanceMap, finalFinalProvides, finalFinalRequires, userInstanceMap ) return instanceMap, finalFinalProvides, finalFinalRequires end function modules.lambdaTab(tab) return modules.lambda(tab.name,tab.input,tab.output,tab.instanceList, tab.generatorStr, tab.generatorParams, tab.globalMetadata) end local function FIFOSizeToDelay( fifoSize ) if fifoSize==0 then return 0 elseif fifoSize<=128 then -- takes one cycle to store, 0 to load return 1 else -- takes one cycle to store, 1 cycle to load return 2 end end local function insertFIFOs( out, delayTable, moduleName, X ) assert( type(moduleName)=="string") assert( X==nil ) local C = require "generators.examplescommon" local verbose = false if verbose then print("* InsertFIFOs",moduleName) end local depth = {} local maxDepth=0 out:visitEach( function( n, args ) local d = 0 if #n.inputs>0 then d = math.max(unpack(args))+1 end depth[n] = d if d>maxDepth then maxDepth=d end return d end) local fifoBits = 0 local fr = out:process( function( n, orig ) n = rigel.newIR(n) local res = n local extraDelayForFIFOs = 0 -- first, insert delays if #n.inputs>0 then err( type(delayTable[orig.inputs[1]])=="number", "missing delay for: ", orig.inputs[1], "IS:"..tostring(delayTable[orig.inputs[1]]) ) assert( type(delayTable[orig])=="number" ) local iDelayThis = delayTable[orig] if n.kind=="apply" or n.kind=="applyMethod" then local fn = n.fn if n.kind=="applyMethod" then if rigel.isPlainFunction(n.inst.module) then fn = n.inst.module else fn = n.inst.module.functions[n.fnname] end end assert( rigel.isPlainFunction(fn) ) extraDelayForFIFOs = FIFOSizeToDelay( fn.inputBurstiness ) + FIFOSizeToDelay( fn.outputBurstiness ) iDelayThis = iDelayThis - fn.delay - extraDelayForFIFOs end assert( iDelayThis >= delayTable[orig.inputs[1]]) local ntmp = n:shallowcopy() local INPUTCNT = #n.inputs -- for statements, we don't care about other inputs than input 0: other inputs can have different delays (they are just passed through) if n.kind=="statements" then INPUTCNT = 1 end for i=1,INPUTCNT do if iDelayThis ~= delayTable[orig.inputs[i]] then local d = iDelayThis-delayTable[orig.inputs[i]] J.err( d>0, "delay at input of this node is less than its input? thisDelay:",iDelayThis," delay of input "..(i-1)..":", delayTable[orig.inputs[i]], "\n",n ) if verbose then print("** DFIFO",moduleName,d,n.name,n.inputs[i].name) print("input streamcount:",n.inputs[i].type:streamCount()) end if n.inputs[i].type:streamCount()==1 then ntmp.inputs[i] = C.fifo( n.inputs[i].type:deInterface(), d, nil, nil, nil, nil, "DELAY_"..moduleName.."_"..n.name )(n.inputs[i]) elseif n.inputs[i].type:streamCount()>0 then local stout = {} J.err( n.inputs[i].type:streamCount()>0, "input has no streams?",n,"INPUT"..i,n.inputs[i] ) for st=1,n.inputs[i].type:streamCount() do local ity if n.inputs[i].type:isArray() then ity = n.inputs[i].type:arrayOver() elseif n.inputs[i].type:isTuple() then ity = n.inputs[i].type.list[st] else assert(false) end stout[st] = C.fifo( ity:deInterface(), d, nil, nil, nil, nil, "DELAY_"..moduleName.."_"..n.name )(n.inputs[i][st-1]) end if n.inputs[i].type:isTuple() then ntmp.inputs[i] = rigel.concat(stout) elseif n.inputs[i].type:isArray() then ntmp.inputs[i] = rigel.concatArray2d("Delayfifo",stout,n.inputs[i].W,n.inputs[i].H) else assert(false) end J.err( n.inputs[i].type == ntmp.inputs[i].type, "BADTYPE",n.inputs[i].type," ",ntmp.inputs[i].type, n.inputs[i].type:streamCount() ) end end end local oldn = n n = rigel.newIR(ntmp) res = n -- print(n) -- print("DELAYDONE",oldn,n) end if n.kind=="apply" and n.type:isRV() and n.type.VRmode~=true and n.inputs[1].type:isRV() and n.inputs[1].type.VRmode~=true then assert( #orig.inputs==1 ) res = n.inputs[1] --err( delayTable[orig.inputs[1]] == iDelayThis, "NYI - input to fn requires delay buffer! inputDelay:",delayTable[orig.inputs[1]]," delayAtInputOfThisFn::",iDelayThis," bits:",n.inputs[1].type:extractData():verilogBits()," del ",delayTable[orig]," fn ",orig.fn.delay,orig, orig.fn ) local NAME = moduleName.."_"..depth[orig].."_"..maxDepth.."_"..n.name.."_"..n.fn.name --err( n.fn.inputBurstiness<=16384, "inputBurstiness for module ",n.fn.name," is way too large: ",n.fn.inputBurstiness ) --err( n.fn.outputBurstiness<=16384, "outputBurstiness for module ",n.fn.name," is way too large: ",n.fn.outputBurstiness ) local ibts = (n.fn.inputBurstiness*n.fn.inputType:extractData():verilogBits()) local obts = (n.fn.outputBurstiness*n.fn.outputType:extractData():verilogBits()) --err( ibts<20*1024*8, "Input burst FIFO is tooo big! ",ibts/8192,"KB" ) --err( obts<20*1024*8, "Output burst FIFO is tooo big! ",obts/8192,"KB" ) local IFIFO, OFIFO if rigel.MONITOR_FIFOS==false then if n.fn.inputBurstiness>0 then local items = n.fn.inputBurstiness + FIFOSizeToDelay( n.fn.inputBurstiness ) if items>16384/4 then print("warning: FIFO allocation is too big! Truncating! INPUT SIDE") print(n.fn) for i=1,30 do print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") end items = 16384/4 end IFIFO = C.fifo( n.inputs[1].type:deInterface(), items, nil, nil, nil,nil, NAME.."IFIFO" ) end if n.fn.outputBurstiness>0 then local items = n.fn.outputBurstiness + FIFOSizeToDelay( n.fn.outputBurstiness ) if items>16384/4 then print("warning: FIFO allocation is too big! Truncating! OUTPUT SIDE") print(n.fn) for i=1,30 do print("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!") end items = 16384/4 end OFIFO = C.fifo( n.type:deInterface(), items, nil, nil, nil, nil, NAME.."_OFIFO" ) end else IFIFO = C.fifoWithMonitor( n.inputs[1].type:deInterface(), n.fn.inputBurstiness + FIFOSizeToDelay( n.fn.inputBurstiness ), delayTable[orig] - n.fn.delay - extraDelayForFIFOs, n.fn.delay, n.inputs[1].rate, true, NAME, n.fn.name, moduleName ) OFIFO = C.fifoWithMonitor( n.type:deInterface(), n.fn.outputBurstiness + FIFOSizeToDelay( n.fn.outputBurstiness ), delayTable[orig], n.fn.delay, n.rate, false, NAME, n.fn.name, moduleName ) end if IFIFO~=nil then local bts = (n.fn.inputBurstiness*n.fn.inputType:extractData():verilogBits()) if verbose then print("IFIFO",moduleName, n.fn.inputBurstiness, n.fn.inputType:extractData():verilogBits(), (bts/8192).."KB", "delay"..n.fn.delay, n.fn.name) end fifoBits = fifoBits + bts res = rigel.apply( J.sanitize(n.name.."_IFIFO"), IFIFO, res ) -- local G = require "generators.core" -- if bts>0 then -- res = G.Print{"IF",rigel.Unoptimized}(res) -- end end res = rigel.apply( n.name, n.fn, res ) if OFIFO~=nil then local bts = (n.fn.outputBurstiness*n.fn.outputType:extractData():verilogBits()) if verbose then print("OFIFO",moduleName,n.fn.outputBurstiness, n.fn.outputType:extractData():verilogBits(), (bts/8192).."KB", "delay"..n.fn.delay, n.fn.name) end fifoBits = fifoBits + bts res = rigel.apply( J.sanitize(n.name.."_OFIFO"), OFIFO, res ) end -- elseif n.kind=="apply" and n.inputs[1].type:streamCount()>1 then -- this is stuff like fan ins: -- assert( n.fn.inputBurstiness==0) -- assert( n.fn.outputBurstiness==0) -- assert( n.inputs[1].type:streamCount()==# elseif n.kind=="apply" or n.kind=="applyMethod" then -- can't applys of modules -- this is things like VR mode, tuples of handshakes, etc -- hopefully we can just ignore this... local fn = n.fn if n.kind=="applyMethod" then if rigel.isPlainFunction(n.inst.module) then fn = n.inst.module else fn = n.inst.module.functions[n.fnname] end end assert( rigel.isPlainFunction(fn) ) err( fn.inputBurstiness==0 ) err( fn.outputBurstiness==0 ) if #orig.inputs==1 then -- err( delayTable[orig.inputs[1]]==delayTable[orig]-fn.delay, "NYI - auto fifo unsupported call type, and the delays don't match! inputDelay:",delayTable[orig.inputs[1]]," thisdelay:",delayTable[orig],"thisFnDelay:",fn.delay,"inputburst:",fn.inputBurstiness,"outburst:",fn.outputBurstiness,"this:",orig , orig.loc ) else err( #orig.inputs==0, "apply with multiple inputs? ",#orig.inputs, orig ) end --[=[ elseif n.kind~="statements" then -- all other nodes (like concats) for k,inp in pairs(orig.inputs) do assert( type(delayTable[inp])=="number" ) assert( type(delayTable[orig])=="number" ) assert( delayTable[inp]<=delayTable[orig] ) local delayDiff = delayTable[orig] - delayTable[inp] if delayDiff>0 then -- insert shift register assert( orig.kind~="apply" and orig.kind~="applyMethod" ) err( inp.type:isRV(),"input to shift register is not RV? is: ",inp.type," this:", orig ) local G = require "generators.core" if verbose then print("DFIFO_statements",moduleName,delayDiff,n) end --res.inputs[k] = modules.makeHandshake(modules.shiftRegister( inp.type:deInterface(), delayDiff ))(res.inputs[k]) res.inputs[k] = C.fifo( inp.type:deInterface(), delayDiff, nil, nil, nil, nil, "DELAY" )(res.inputs[k]) end end]=] end return res end) return fr end local function calculateDelaysZ3( output, moduleName ) assert( type(moduleName)=="string" ) local statements = {} local ofTerms = {} local verbose = false if verbose then print("* DelaysZ3 ",moduleName ) end local seenNames = {} local resdelay = output:visitEach( function(n, inputs) local res local name = J.verilogSanitizeInner(n.name) seenNames[name] = n table.insert( statements, "(declare-const "..name.." Int)" ) if n.kind=="input" or n.kind=="constant" then table.insert( statements, "(assert (= "..name.." 0))" ) res = name elseif n.kind=="concat" or n.kind=="concatArray2d" then -- todo fix: it looks like all streams in a concat get the same delay? is that good enough behavior? for k,i in ipairs(inputs) do table.insert( statements, "(assert (>= "..name.." "..i.."))" ) table.insert( ofTerms, "(* (- "..name.." "..i..") "..(n.inputs[k].type:lower():verilogBits())..")" ) end res = name elseif n.kind=="apply" or (n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module)) then local fn = n.fn if n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module) then fn = n.inst.module end -- if we have burstiness, we need to add a fifo, which will introduce extra delay! local extra = 0 if fn.inputType:isRV() then extra = extra + FIFOSizeToDelay(fn.inputBurstiness) end if fn.outputType:isRV() then extra = extra + FIFOSizeToDelay(fn.outputBurstiness) end if fn.inputType==types.Interface() or (fn.inputType:isrv() and fn.inputType:extractData():verilogBits()==0) then --res = fn.delay+extra table.insert( statements, "(assert (= "..name.." "..(fn.delay+extra).."))" ) res = name else err(fn.delay~=nil,"Error: fn "..fn.name.." is missing delay? "..tostring(fn.inputType).." "..tostring(fn.outputType)) --res = inputs[1] + fn.delay + extra --assert(false) table.insert( statements, "(assert (>= "..name.." (+ "..inputs[1].." "..(fn.delay+extra)..")))" ) local bts = Uniform(n.inputs[1].type:lower():verilogBits()):toNumber() if bts>0 then table.insert( ofTerms, "(* (- "..name.." "..inputs[1]..") "..bts..")" ) end res = name end elseif n.kind=="applyMethod" then if n.inst.module.functions[n.fnname].inputType==types.null() or n.inst.module.functions[n.fnname].inputType:isInil() then --res = n.inst.module.functions[n.fnname].delay -- assert(false) table.insert( statements, "(assert (= "..name.." "..n.inst.module.functions[n.fnname].delay.."))" ) res = name else table.insert( statements, "(assert (>= "..name.." (+ "..inputs[1].." "..n.inst.module.functions[n.fnname].delay..")))" ) local bts = n.inputs[1].type:lower():verilogBits() if bts>0 then table.insert( ofTerms, "(* (- "..name.." "..inputs[1]..") "..bts..")" ) end res = name --res = inputs[1] + n.inst.module.functions[n.fnname].delay --assert(false) end elseif n.kind=="statements" then table.insert( statements, "(assert (= "..name.." "..inputs[1].."))" ) res = name elseif n.kind=="selectStream" then -- for concat, we currently make all stream delays the same! So just look at index 1 always table.insert( statements, "(assert (= "..name.." "..inputs[1].."))" ) res = name else print("delay NYI - ",n.kind,input.type,output.type) assert(false) end err( type(res)=="string", "delay thing returned something other than a string?",res ) return res end) -- add extra constraints to make sure FanOuts are delayed from FanIns local __INPUT = {} -- token to indicate this traces directly to input local traceDelay = {} -- name->minDelayFromInput (this is the sum of the delays in the trace back to the input) local nodeToName = {} output:visitEach( function(n, arg) local name = J.verilogSanitizeInner(n.name) nodeToName[n] = name local res if n.kind=="input" or n.kind=="constant" then res = J.broadcast(__INPUT,types.streamCount(n.type)) traceDelay[name] = J.broadcast(0,types.streamCount(n.type)) elseif n.kind=="concat" or n.kind=="concatArray2d" then traceDelay[name] = {} res = {} for i=1,#n.inputs do assert( #arg[i] == n.inputs[i].type:streamCount() ) if #arg[i]>=1 then J.err( #arg[i]==1, "concat: an input has multiple streams?\ninput:", i,"\n",n.inputs[i],"\nty:",n.inputs[i].type,"\nstcnt:",n.inputs[i].type:streamCount(),"\nargcnt:",#arg[i],"\n",n,"\n",arg[i][1],"\n",tostring(arg[i][2]) ) res[i] = arg[i][1] traceDelay[name][i] = traceDelay[ nodeToName[n.inputs[i]] ][1] else print("Concat with strange number of streams?",n) assert(false) end end elseif n.kind=="apply" or n.kind=="applyMethod" then --(n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module)) then local fn = n.fn if n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module) then fn = n.inst.module elseif n.kind=="applyMethod" then fn = n.inst.module.functions[n.fnname] end local delay = 0 --assert( #n.inputs==1 ) if #n.inputs==1 then for i=1,fn.inputType:streamCount() do --assert( #traceDelay[ nodeToName[n.inputs[i]] ]==1 ) delay = math.max( delay, traceDelay[ nodeToName[n.inputs[1]] ][i]+fn.delay ) end elseif #n.inputs==0 then delay = fn.delay else assert(false) end traceDelay[name] = J.broadcast( delay, n.type:streamCount() ) if fn.inputType:streamCount()<=1 and fn.outputType:streamCount()<=1 then if fn.outputType:streamCount()==0 then res = {} elseif fn.inputType:streamCount()==0 then res = J.broadcast(__INPUT,types.streamCount(n.type)) else assert( fn.outputType:streamCount()==1 ) res = {arg[1][1]} end elseif fn.inputType:streamCount()~=fn.outputType:streamCount() then -- NOTE: we require there to be a FIFO between paths whenever stream count changes (this is BOTH when there is a FanOut OR a FanIn) assert(#arg==1) assert(#arg[1]==types.streamCount(fn.inputType) ) for i=1,types.streamCount(fn.inputType) do -- insert constraints to make sure delay of this node is at least 1 larger than prior fanin/out if arg[1][i]~=__INPUT then -- paths to input don't need a FIFO local minDelay = traceDelay[name][1] - traceDelay[ arg[1][i] ][1] + 2 table.insert( statements, "(assert (>= "..name.." (+ "..arg[1][i].." "..minDelay.."))) ; DIAMOND" ) end end -- now, if we fan in, make sure we have a FIFO after this node... res = J.broadcast(name,types.streamCount(n.type)) elseif fn.inputType:streamCount()==fn.outputType:streamCount() and fn.fifoStraightThrough then -- sort of a hack: we marked this function to indicate that streams pass straight through, so we can just propagate signals res = arg[1] else J.err(false, "unknown fn fifo behavior? ",fn.name," type:",fn.inputType,"->",fn.outputType," inputCount:",#n.inputs," inputStreamCount:",fn.inputType:streamCount()," outputStreamCount:",fn.outputType:streamCount() ) end elseif n.kind=="selectStream" then res = {arg[1][n.i+1]} traceDelay[name] = {traceDelay[ nodeToName[n.inputs[1]] ][n.i+1]} elseif n.kind=="statements" then res = arg[1] traceDelay[name] = traceDelay[ nodeToName[n.inputs[1]] ] else J.err( false, "NYI - Diamond insertion on ",n) end J.err( type(res)=="table", "diamond insertion bad res ",n ) J.err( #res == types.streamCount(n.type), "diamond insertion error (res:",#res,",streamcount:",types.streamCount(n.type),",type:",n.type,")- ",n ) for i=1,#res do assert( res[i]==__INPUT or type(res[i])=="string") end J.err( type(traceDelay[name])=="table", "diamond insertion bad traceDelay ",n, "is:"..tostring(traceDelay[name]) ) J.err( #traceDelay[name] == types.streamCount(n.type), "diamond insertion error traceDelay (res:",#res,",streamcount:",types.streamCount(n.type),",type:",n.type,")- ",n," #traceDelay",#traceDelay[name] ) for i=1,#res do assert( type(traceDelay[name][i])=="number" ) end return res end) local z3str = {} table.insert(z3str,"(set-option :produce-models true)") table.insert(z3str,"(declare-const MINVAR Int)") for k,v in ipairs(statements) do table.insert(z3str, v ) end if #ofTerms==0 then table.insert(z3str,"(assert (>= MINVAR 0))") else table.insert(z3str,"(assert (>= MINVAR (+ "..table.concat(ofTerms,"\n")..")))") end table.insert(z3str, "(minimize MINVAR )") table.insert(z3str, "(check-sat)") --table.insert(z3str, "(get-objectives)") table.insert(z3str, "(get-model)") z3str = table.concat(z3str,"\n") if verbose then print("** Z3STR_"..moduleName) print(z3str) end local z3call = [[echo "]]..z3str..[[" | z3 -in -smt2]] local f = assert (io.popen (z3call)) local res = "" local curname local delayTable = {} local totalbits for line in f:lines() do if string.match(line,"error") then J.err(false,"Z3 Error:", line, " from command: ",z3str) elseif string.match(line,"%|%->") then -- some versions of z3 write out the objective function elseif string.match(line,"define%-fun") then local nam = string.match(line,"define%-fun (%g+)") curname = nam elseif string.match (line, "%d+") then local num = string.match (line, "%d+") num = tonumber(num) err(type(curname)=="string","name not set? is:",curname) if curname=="MINVAR" then totalbits = num else err( seenNames[curname]~=nil,"name not valid?",curname ) delayTable[curname] = num end end end f:close() if verbose then print("** TOTALBITS",totalbits) print("** DELAYTABLE") print("|value|delay|bits|") for k,v in pairs(delayTable) do print("|"..k.."|"..v.."|"..(seenNames[k].type:lower():verilogBits())) end end local delayTableASTs = {} for k,v in pairs(seenNames) do err( delayTable[k]~=nil," missing delay for: ",k) delayTableASTs[v] = delayTable[k] end err( type(delayTableASTs[output])=="number","delay for output missing? name: ",output.name," is: ",delayTableASTs[output] ) -- print("RES",res) -- if string.match(res,"sat") then -- local num = string.match (res, "%d+") -- print("Z3MAX:",num) -- J.err(num~=nil and type(tonumber(num))=="number","failed to find maximum value of expr? "..tostring(self)) -- return tonumber(num) -- else -- assert(false) -- end return delayTableASTs[output], delayTableASTs end local function calculateDelaysGreedy( output ) local delayTable = {} local resdelay = output:visitEach( function(n, inputs) local res if n.kind=="input" or n.kind=="constant" then res = 0 elseif n.kind=="concat" or n.kind=="concatArray2d" then res = math.max(unpack(inputs)) elseif n.kind=="apply" or (n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module)) then local fn = n.fn if n.kind=="applyMethod" and rigel.isPlainFunction(n.inst.module) then fn = n.inst.module end -- if we have burstiness, we need to add a fifo, which will introduce extra delay! local extra = 0 if fn.inputType:isRV() then extra = extra + FIFOSizeToDelay(fn.inputBurstiness) end if fn.outputType:isRV() then extra = extra + FIFOSizeToDelay(fn.outputBurstiness) end if fn.inputType==types.Interface() or (fn.inputType:isrv() and fn.inputType:extractData():verilogBits()==0) then res = fn.delay+extra else err(fn.delay~=nil,"Error: fn ",fn.name," is missing delay? ",fn.inputType," ",fn.outputType) res = inputs[1] + fn.delay + extra end elseif n.kind=="applyMethod" then if n.inst.module.functions[n.fnname].inputType==types.null() or n.inst.module.functions[n.fnname].inputType:isInil() then res = n.inst.module.functions[n.fnname].delay else res = inputs[1] + n.inst.module.functions[n.fnname].delay end elseif n.kind=="statements" then res = inputs[1] elseif n.kind=="selectStream" then res = inputs[1] else print("delay NYI - ",n.kind,input.type,output.type) assert(false) end err( type(res)=="number",n.kind.." returned a non-numeric delay? returned:", res, n) delayTable[n] = res return res end) assert(type(resdelay)=="number") return resdelay, delayTable end -- function definition -- output, inputs -- autofifos: override global autofifo setting function modules.lambda( name, input, output, instanceList, generatorStr, generatorParams, globalMetadata, autofifos, z3fifos, X ) if DARKROOM_VERBOSE then print("lambda start '"..name.."'") end err( X==nil, "lambda: too many arguments" ) err( type(name) == "string", "lambda: module name must be string" ) err( input==nil or rigel.isIR( input ), "lambda: input must be a rigel input value or nil" ) err( input==nil or input.kind=="input", "lambda: input must be a rigel input or nil" ) err( rigel.isIR( output ), "modules.lambda: module '",name,"' output should be Rigel value, but is: ",output ) if instanceList==nil then instanceList={} end err( type(instanceList)=="table", "lambda: instances must be nil or a table") J.map( instanceList, function(n) err( rigel.isInstance(n), "lambda: instances argument must be an array of instances" ) end ) err( generatorStr==nil or type(generatorStr)=="string","lambda: generatorStr must be nil or string") err( generatorParams==nil or type(generatorParams)=="table","lambda: generatorParams must be nil or table") err( globalMetadata==nil or type(globalMetadata)=="table","lambda: globalMetadata must be nil or table") -- should we compile thie module as handshaked or not? -- For handshaked modules, the input/output type is _not_ necessarily handshaked -- for example, input/output type could be null, but the internal connections may be handshaked -- so, check if we handshake anywhere local HANDSHAKE_MODE = rigel.handshakeMode(output) local instanceMap = J.invertTable(instanceList) instanceList=nil -- now invalid -- collect instances (user doesn't have to explicitly give all instances) local instanceMap, provides, requires, requiresWithReadys = collectInstances( name, output, instanceMap ) if rigel.SDF then input, output = lambdaSDFNormalize(input,output,name) local sdfMaxRate = output:sdfExtremeRate(true) if (Uniform(sdfMaxRate[1]):le(sdfMaxRate[2]):assertAlwaysTrue())==false then output:visitEach(function(n) print(tostring(n)) end) err( false,"LambdaSDFNormalize failed? somehow we ended up with a instance utilization of "..tostring(sdfMaxRate[1]).."/"..tostring(sdfMaxRate[2]).." somewhere in module '"..name.."'") end end --local resdelay, delayTable = calculateDelaysGreedy( output ) local resdelay, delayTable if (rigel.Z3_FIFOS and HANDSHAKE_MODE and z3fifos==nil) or z3fifos==true then resdelay, delayTable = calculateDelaysZ3( output, name ) else resdelay, delayTable = calculateDelaysGreedy( output, name ) end local inputBurstiness = 0 local outputBurstiness = 0 if (rigel.AUTO_FIFOS~=false and autofifos==nil) or autofifos==true then if HANDSHAKE_MODE and input~=nil and input.type:isInil()==false then output = insertFIFOs( output, delayTable, name ) elseif input~=nil and input.type:isInil()==false then output:visitEach( function(n) if n.kind=="apply" then if n==output and n.inputs[1].kind=="input" then -- HACK! For wrappers, just propagate the bursts up! inputBurstiness = n.fn.inputBurstiness outputBurstiness = n.fn.outputBurstiness else err( n.fn.inputBurstiness==0 and n.fn.outputBurstiness==0, "NYI: burstiness must be 0 for non-handshaked modules! \nmodule:",name,":",input.type,"->",output.type," \ncontains function:",n.fn.name,":",n.fn.inputType,"->",n.fn.outputType," \ninputBurstiness:", tostring(n.fn.inputBurstiness), " outputBurstiness:", tostring(n.fn.outputBurstiness)," loc:", n.loc ) end end end) else -- print("NYI - FIFO ALLOCATION FOR INIL MODULE") end end name = J.verilogSanitize(name) local res = {kind = "lambda", name=name, input = input, output = output, instanceMap=instanceMap, generator=generatorStr, params=generatorParams, requires = requires, provides=provides, globalMetadata={}, delay = resdelay } if input==nil then res.inputType = types.null() else res.inputType = input.type end res.outputType = output.type local usedNames = {} output:visitEach( function(n) if n.name~=nil then assert(type(n.name)=="string") if usedNames[n.name]~=nil then print("FIRST: "..usedNames[n.name]) print("SECOND: "..n.loc) print("NAME USED TWICE:",n.name) assert(false) end usedNames[n.name] = n.loc end end) res.stateful=false output:visitEach( function(n) if n.kind=="apply" then err( type(n.fn.stateful)=="boolean", "Missing stateful annotation, fn ",n.fn.name ) res.stateful = res.stateful or n.fn.stateful elseif n.kind=="applyMethod" then if rigel.isModule(n.inst.module) then err( type(n.inst.module.functions[n.fnname].stateful)=="boolean", "Missing stateful annotation, fn "..n.fnname ) res.stateful = res.stateful or n.inst.module.functions[n.fnname].stateful elseif rigel.isPlainFunction(n.inst.module) then err( type(n.inst.module.stateful)=="boolean", "Missing stateful annotation, fn "..n.fnname ) res.stateful = res.stateful or n.inst.module.stateful else assert(false) end end end) for inst,_ in pairs(res.instanceMap) do res.stateful = res.stateful or inst.module.stateful end -- collect metadata output:visitEach( function(n) if n.kind=="apply" or n.kind=="applyMethod" then local globalMetadata if n.kind=="apply" then globalMetadata=n.fn.globalMetadata else globalMetadata=n.inst.module.globalMetadata end for k,v in pairs(globalMetadata) do err( res.globalMetadata[k]==nil or res.globalMetadata[k]==v,"Error: wrote to global metadata '",k,"' twice! this value: '",v,"', orig value: '",res.globalMetadata[k],"' ",n.loc) res.globalMetadata[k] = v end end end) -- NOTE: notice that this will overwrite the previous metadata values if globalMetadata~=nil then for k,v in pairs(globalMetadata) do J.err(type(k)=="string","global metadata key must be string") if res.globalMetadata[k]~=nil and res.globalMetadata[k]~=v then --print("WARNING: overwriting metadata '"..k.."' with previous value '"..tostring(res.globalMetadata[k]).."' ("..type(res.globalMetadata[k])..") with overridden value '"..tostring(v).."' ("..type(v)..")") end res.globalMetadata[k]=v end end if terralib~=nil then res.makeTerra = function() return MT.lambdaCompile(res) end end if rigel.SDF then if input==nil then res.sdfInput = SDF({1,1}) else assert( SDFRate.isSDFRate(input.rate) ) if input.type==types.null() then -- HACK(?): if we have a nullary input, look for the actual input to the pipeline, -- which is the module this input drives. Use that module's rate as the input rate -- this pretty much only applies to the top module output:visitEach( function(n) if #n.inputs==1 and n.inputs[1]==input then res.sdfInput = n.rate end end) assert(res.sdfInput~=nil) else res.sdfInput = SDF(input.rate) end end res.sdfOutput = output.rate err(SDF.isSDF(res.sdfInput),"NOT SDF inp ",res.name," ",tostring(res.sdfInput)) err(SDF.isSDF(res.sdfOutput),"NOT SDF out ",res.name," ",tostring(res.sdfOutput)) if DARKROOM_VERBOSE then print("LAMBDA",name,"SDF INPUT",res.sdfInput[1][1],res.sdfInput[1][2],"SDF OUTPUT",res.sdfOutput[1][1],res.sdfOutput[1][2]) end -- each rate should be <=1 for k,v in ipairs(res.sdfInput) do err( v[1]:le(v[2]):assertAlwaysTrue(), "lambda '",name,"' has strange SDF rate. input: ",tostring(res.sdfInput)," output:",tostring(res.sdfOutput)) end -- each rate should be <=1 for _,v in ipairs(res.sdfOutput) do err( v[1]:le(v[2]):assertAlwaysTrue(), "lambda '",name,"' has strange SDF rate. input: ",tostring(res.sdfInput)," output:",tostring(res.sdfOutput)) end end if HANDSHAKE_MODE then res.fifoed = checkFIFOs( output, name ) end local function makeSystolic( fn ) local module = Ssugar.moduleConstructor( fn.name ):onlyWire( HANDSHAKE_MODE ) local process = module:addFunction( Ssugar.lambdaConstructor( "process", rigel.lower(fn.inputType), "process_input") ) local reset local rateMonitors = { usValid={}, dsValid={}, dsReady={}, delay={}, rate={}, functionName={} } if fn.stateful then reset = module:addFunction( Ssugar.lambdaConstructor( "reset", types.null(), "resetNILINPUT", "reset") ) end for inst,_ in pairs(fn.instanceMap) do err( systolic.isModule(inst.module.systolicModule), "Missing systolic module for instance '",inst.name,"' of module '",inst.module.name,"'") -- even though this isn't external here, it may be refered to in other modules (ie some ports may be externalized), so we need to use the same instance local I = module:add( inst:toSystolicInstance() ) if inst.module.stateful then J.err(module:lookupFunction("reset")~=nil,"module '",fn.name,"' instantiates a stateful module '",inst.module.name,"', but is not itself stateful? stateful=",res.stateful ) module:lookupFunction("reset"):addPipeline( I["reset"](I,nil,module:lookupFunction("reset"):getValid()) ) end end for inst,fnmap in pairs(fn.requires) do module:addExternal( inst:toSystolicInstance(), fnmap ) -- hack: systolic expects ready to be explicitly given! if rigel.isModule(inst.module) then for fnname,_ in pairs(fnmap) do local fn = inst.module.functions[fnname] if types.isHandshakeAny(fn.inputType) or types.isHandshakeAny(fn.outputType) then module:addExternalFn( inst:toSystolicInstance(), fnname.."_ready" ) end end elseif rigel.isPlainFunction(ic.instance.module) then if types.isHandshakeAny(ic.instance.module.inputType) or types.isHandshakeAny(ic.instance.module.outputType) then module:addExternalFn( inst:toSystolicInstance(), fnname.."_ready" ) end else assert(false) end end for inst,fnmap in pairs(fn.provides) do for fnname,_ in pairs(fnmap) do module:addProvidesFn( inst:toSystolicInstance(), fnname ) -- hack... if rigel.isModule(inst.module) then local fn = inst.module.functions[fnname] if types.isHandshakeAny(fn.inputType) or types.isHandshakeAny(fn.outputType) then module:addProvidesFn( inst:toSystolicInstance(), fnname.."_ready" ) end elseif rigel.isPlainFunction(inst.module) then if types.isHandshakeAny(inst.module.inputType) or types.isHandshakeAny(inst.module.outputType) then module:addProvidesFn( inst:toSystolicInstance(), fnname.."_ready" ) end else assert(false) end end end local out = fn.output:codegenSystolic( module, rateMonitors ) --if HANDSHAKE_MODE==false then if fn.inputType:isrv() and fn.outputType:isrv() then err( (out[1]:getDelay()>0) == (res.delay>0), "Module '"..res.name.."' is declared with delay=",res.delay," but systolic AST delay=",out[1]:getDelay()," which doesn't match") end if HANDSHAKE_MODE==false and (res.stateful or res.delay>0) then local CE = S.CE("CE") process:setCE(CE) end assert(systolic.isAST(out[1])) err( out[1].type==rigel.lower(res.outputType), "modules.lambda: Internal error, systolic output type is ",out[1].type," but should be ",rigel.lower(res.outputType)," function ",name ) -- for the non-handshake (purely systolic) modules, the ready bit doesn't flow from outputs to inputs, -- it flows from inputs to outputs. The reason is that upstream things can't stall downstream things anyway, so there's really no point of doing it the 'right' way. -- this is kind of messed up! if fn.inputType:isrRV() and fn.output.type:isrRV() then -- weird (old) RV->RV fn type? assert( S.isAST(out[2]) ) local readyfn = module:addFunction( S.lambda("ready", readyInput, out[2], "ready", {} ) ) elseif fn.inputType:isrV() and fn.outputType:isrRV() then local readyfn = module:addFunction( S.lambda("ready", S.parameter("RINIL",types.null()), out[2], "ready", {} ) ) elseif HANDSHAKE_MODE then local readyinp, readyout, readyPipelines = fn.output:codegenSystolicReady( module, rateMonitors ) local readyfn = module:addFunction( S.lambda("ready", readyinp, readyout, "ready", readyPipelines ) ) end assert(Ssugar.isFunctionConstructor(process)) process:setOutput( out[1], "process_output" ) --err( module:lookupFunction("process"):isPure() ~= res.stateful, "Module '"..res.name.."' is declared stateful=",res.stateful," but systolic AST is pure=",module:lookupFunction("process"):isPure()," which doesn't match!",out[1] ) return module end function res.makeSystolic() local systolicModule = makeSystolic(res) systolicModule:toVerilog() return systolicModule end if DARKROOM_VERBOSE then print("lambda done '",name,"'") end return rigel.newFunction( res ) end -- makeTerra: a lua function that returns the terra implementation -- makeSystolic: a lua function that returns the systolic implementation. -- Input argument: systolic input value. Output: systolic output value, systolic instances table -- outputType, delay are optional, but will cause systolic to be built if they are missing! function modules.lift( name, inputType, outputType, delay, makeSystolic, makeTerra, generatorStr, sdfOutput, instanceMap, X ) err( type(name)=="string", "modules.lift: name must be string" ) err( types.isType( inputType ), "modules.lift: inputType must be rigel type" ) err( inputType:isData(),"modules.lift: inputType should be Data Type, but is: ",inputType) err( outputType==nil or types.isType( outputType ), "modules.lift: outputType must be rigel type, but is "..tostring(outputType) ) err( outputType==nil or outputType:isData(),"modules.lift: outputType should be Data Type, but is: "..tostring(outputType)) err( delay==nil or type(delay)=="number", "modules.lift: delay must be number" ) err( sdfOutput==nil or SDFRate.isSDFRate(sdfOutput),"modules.lift: SDF output must be SDF") err( makeTerra==nil or type(makeTerra)=="function", "modules.lift: makeTerra argument must be lua function that returns a terra function" ) err( type(makeSystolic)=="function", "modules.lift: makeSystolic argument must be lua function that returns a systolic value" ) err( generatorStr==nil or type(generatorStr)=="string", "generatorStr must be nil or string") assert(X==nil) if instanceMap==nil then instanceMap={} end err( type(instanceMap)=="table", "lift: instanceMap should be table") if sdfOutput==nil then sdfOutput = SDF{1,1} end name = J.verilogSanitize(name) local res = { kind="lift", name=name, inputType = inputType, delay=delay, sdfInput=SDF{1,1}, sdfOutput=SDF(sdfOutput), stateful=false, generator=generatorStr, instanceMap=instanceMap } if outputType==types.null() then res.outputType = types.Interface() else res.outputType = outputType end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(name) local systolicInput = S.parameter( "inp", inputType ) local systolicOutput, systolicInstances systolicOutput, systolicInstances = makeSystolic(systolicInput) err( ( (outputType==types.null() or outputType==types.Trigger) and systolicOutput==nil) or systolicAST.isSystolicAST(systolicOutput), "modules.lift: makeSystolic returned something other than a systolic value (module "..name.."), returned: ",systolicOutput ) if outputType~=nil and systolicOutput~=nil then -- user may not have passed us a type, and is instead using the systolic system to calculate it err( systolicOutput.type==rigel.lower(types.S(types.Par(outputType))), "lifted systolic output type does not match. Is ",systolicOutput.type," but should be ",outputType,", which lowers to ",rigel.lower(types.S(types.Par(outputType)))," (module ",name,")" ) end if systolicInstances~=nil then for k,v in pairs(systolicInstances) do systolicModule:add(v) end end local CE if systolicOutput~=nil and (delay==nil or delay>0) then if (systolicOutput:isPure()==false or systolicOutput:getDelay()>0) then CE = S.CE("process_CE") end end systolicModule:addFunction( S.lambda("process", systolicInput, systolicOutput, "process_output",nil,nil,CE) ) systolicModule:complete() return systolicModule end J.err(types.isType(res.outputType),"modules.lift: missing outputType") if res.delay==nil then local SM = res.makeSystolic() res.delay = SM:getDelay("process") function res.makeSystolic() return SM end end local res = rigel.newFunction( res ) if terralib~=nil then local systolicInput, systolicOutput if makeTerra==nil then systolicInput = res.systolicModule.functions.process.inputParameter systolicOutput = res.systolicModule.functions.process.output end local tmod = MT.lift( res, name, inputType, outputType, makeTerra, systolicInput, systolicOutput ) if type(tmod)=="function" then res.makeTerra = tmod elseif terralib.types.istype(tmod) then res.terraModule = tmod else assert(false) end end return res end function modules.moduleLambda( name, functionList, instanceList, X ) err( type(name)=="string", "moduleLambda: name must be string") assert(X==nil) -- collect globals of all fns local requires = {} local provides = {} local globalMetadata = {} local stateful = false for k,fn in pairs(functionList) do err( type(k)=="string", "newModule: function name should be string?") err( rigel.isPlainFunction(fn), "newModule: function should be plain Rigel function") for inst,fnlist in pairs(fn.requires) do for fn,_ in pairs(fnlist) do J.deepsetweak(requires,{inst,fn},1) end end for inst,fnlist in pairs(fn.provides) do for fn,_ in pairs(fnlist) do J.deepsetweak(provides,{inst,fn},1) end end for k,v in pairs(fn.globalMetadata) do assert(globalMetadata[k]==nil); globalMetadata[k]=v end stateful = stateful or fn.stateful end if instanceList==nil then instanceList={} end err( type(instanceList)=="table", "moduleLambda: instanceList should be table") local instanceMap = {} for _,inst in pairs(instanceList) do err( rigel.isInstance(inst), "moduleLambda: entries in instanceList should be instances" ) for inst,fnlist in pairs(inst.module.requires) do for fn,_ in pairs(fnlist) do J.deepsetweak(requires,{inst,fn},1) end end for inst,fnlist in pairs(inst.module.provides) do for fn,_ in pairs(fnlist) do J.deepsetweak(provides,{inst,fn},1) end end instanceMap[inst] = 1 end --makeSystolic=makeSystolic,makeTerra=makeTerra, local tab = {name=name,functions=functionList, globalMetadata=globalMetadata, stateful=stateful, requires=requires, provides=provides, instanceMap=instanceMap, stateful=stateful } return rigel.newModule(tab) end function modules.liftVerilogTab(tab) return modules.liftVerilog( tab.name, tab.inputType, tab.outputType, tab.vstr, tab.globalMetadata, tab.sdfInput, tab.sdfOutput, tab.instanceMap, tab.delay, tab.inputBurstiness, tab.outputBurstiness, tab.stateful ) end -- requires: this is a map of instance callsites (for external requirements) -- instanceMap: this is a map of rigel instances of modules this depends on modules.liftVerilog = memoize(function( name, inputType, outputType, vstr, globalMetadata, sdfInput, sdfOutput, instanceMap, delay, inputBurstiness, outputBurstiness, stateful, X ) err( type(name)=="string", "liftVerilog: name must be string") err( types.isType(inputType), "liftVerilog: inputType must be type") err( types.isType(outputType), "liftVerilog: outputType must be type") err( type(vstr)=="string" or type(vstr)=="function", "liftVerilog: verilog string must be string or function that produces string") err( globalMetadata==nil or type(globalMetadata)=="table", "liftVerilog: global metadata must be table") if sdfInput==nil then sdfInput=SDF{1,1} end err( SDFRate.isSDFRate(sdfInput), "liftVerilog: sdfInput must be SDF rate, but is: "..tostring(sdfInput)) if sdfOutput==nil then sdfOutput=SDF{1,1} end err( SDFRate.isSDFRate(sdfOutput), "liftVerilog: sdfOutput must be SDF rate, but is: "..tostring(sdfOutput)) err( X==nil, "liftVerilog: too many arguments") if stateful==nil then stateful = true end local res = { kind="liftVerilog", inputType=inputType, outputType=outputType, verilogString=vstr, name=name, instanceMap=instanceMap, delay = delay, inputBurstiness=inputBurstiness, outputBurstiness=outputBurstiness } res.stateful = stateful res.sdfInput=SDF(sdfInput) res.sdfOutput=SDF(sdfOutput) res.requires = {} res.globalMetadata = {} if globalMetadata~=nil then for k,v in pairs(globalMetadata) do res.globalMetadata[k] = v end end if instanceMap~=nil then for inst,_ in pairs(instanceMap) do J.err(rigel.isInstance(inst),"liftVerilog: instance map should be map of instances, but is: ",inst) for inst,fnlist in pairs(inst.module.requires) do for fn,_ in pairs(fnlist) do J.deepsetweak(res.requires,{inst,fn},1) end end for kk,vv in pairs(inst.module.globalMetadata) do res.globalMetadata[kk] = vv end end end function res.makeSystolic() if type(vstr)=="function" then vstr = vstr(res) end local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) s:verilog(vstr) return s end return rigel.newFunction(res) end) modules.liftVerilogModule = memoize(function( name, vstr, functionList, stateful, X ) err( type(name)=="string", "liftVerilogModule: name must be string") err( type(vstr)=="string", "liftVerilogModule: verilog string must be string") err( type(functionList)=="table", "liftVerilogModule: functionList must be table") err( X==nil, "liftVerilog: too many arguments") for _,fn in pairs(functionList) do err( rigel.isPlainFunction(fn),"liftVerilogModule: functions in function list should be rigel functions") end local res = rigel.newModule{ name=name, functions=functionList, stateful=stateful } function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) s:verilog(vstr) return s end return res end) modules.constSeqInner = memoize(function( value, A, w, h, T, X ) err( type(value)=="table", "constSeq: value should be a lua array of values to shift through") err( J.keycount(value)==#value, "constSeq: value should be a lua array of values to shift through") err( #value==w*h, "constSeq: value array has wrong number of values") err( X==nil, "constSeq: too many arguments") err( T>=1, "constSeq: T must be >=1") err( type(w)=="number", "constSeq: W must be number" ) err( type(h)=="number", "constSeq: H must be number" ) err( types.isType(A), "constSeq: type must be type" ) for k,v in ipairs(value) do err( A:checkLuaValue(v), "constSeq value array index "..tostring(k).." cannot convert to the correct systolic type" ) end local res = { kind="constSeq", A = A, w=w, h=h, value=value, T=T} res.inputType = types.rv(types.Par(types.Trigger)) local W = w/T err( W == math.floor(W), "constSeq T must divide array size") res.outputType = types.rv(types.Par(types.array2d(A,W,h))) res.stateful = (T>1) res.sdfInput, res.sdfOutput = SDF{1,1}, SDF{1,1} -- well, technically this produces 1 output for every (nil) input -- TODO: FIX: replace this with an actual hash function... it seems likely this can lead to collisions local vh = J.to_string(value) if #vh>50 then vh = string.sub(vh,0,50) end -- some different types can have the same lua array representation (i.e. different array shapes), so we need to include both res.name = verilogSanitize("constSeq_"..tostring(A).."_"..tostring(vh).."_T"..tostring(T).."_w"..tostring(w).."_h"..tostring(h)) res.delay = 0 if terralib~=nil then res.terraModule = MT.constSeq(res, value, A, w, h, T,W ) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sconsts = J.map(J.range(T), function() return {} end) for C=0, T-1 do for y=0, h-1 do for x=0, W-1 do table.insert(sconsts[C+1], value[y*w+C*W+x+1]) end end end local shiftOut, shiftPipelines, resetPipelines = fpgamodules.addShifterSimple( systolicModule, J.map(sconsts, function(n) return S.constant(n,types.array2d(A,W,h)) end), DARKROOM_VERBOSE ) local inp = S.parameter("process_input", types.Trigger ) local CE if res.stateful then CE = S.CE("process_CE") systolicModule:addFunction( S.lambda("reset", S.parameter("process_nilinp", types.null() ), nil, "process_reset", resetPipelines, S.parameter("reset", types.bool() ) ) ) end systolicModule:addFunction( S.lambda("process", inp, shiftOut, "process_output", shiftPipelines, nil, CE ) ) return systolicModule end return rigel.newFunction( res ) end) function modules.constSeq( value, A, w, h, T, X ) err( type(value)=="table", "constSeq: value should be a lua array of values to shift through") local UV = J.uniq(value) local I = modules.constSeqInner(UV,A,w,h,T,X) return I end -- addressable: if true, this will accept an index, which will seek to the location every cycle modules.freadSeq = memoize(function( filename, ty, addressable, X ) err( type(filename)=="string", "filename must be a string") err( types.isType(ty), "type must be a type") err( ty:verilogBits()>0, "freadSeq: type has zero size?" ) err( X==nil, "freadSeq: too many arguments" ) rigel.expectBasic(ty) local filenameVerilog=filename local res = {kind="freadSeq", filename=filename, filenameVerilog=filenameVerilog, type=ty, stateful=true, delay=3} if addressable then res.inputType=types.rv(types.Par(types.uint(32))) res.outputType=types.rv(types.Par(ty)) else res.inputType=types.rv(types.Par(types.Trigger)) res.outputType=types.rv(types.Par(ty)) end res.sdfInput=SDF{1,1} res.sdfOutput=SDF{1,1} if addressable==nil then addressable=false end err( type(addressable)=="boolean", "freadSeq: addressable must be bool") res.name = J.sanitize("freadSeq_"..verilogSanitize(filename)..verilogSanitize(tostring(ty)).."_addressable"..tostring(addressable)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sfile = systolicModule:add( S.module.file( filenameVerilog, ty, true, true, true, false, true ):instantiate("freadfile") ) local inp if addressable then inp = S.parameter("process_input", types.uint(32) ) else inp = S.parameter("process_input", types.null() ) end local nilinp = S.parameter("process_nilinp", types.null() ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", inp, sfile:read(inp), "process_output", nil, nil, CE ) ) systolicModule:addFunction( S.lambda("reset", nilinp, nil, "process_reset", {sfile:reset()}, S.parameter("reset", types.bool() ) ) ) return systolicModule end res = rigel.newFunction(res) if terralib~=nil then res.terraModule = MT.freadSeq( res, filename, ty, addressable ) end return res end) -- passthrough: write out the input? default=true -- allowBadSizes: hack for legacy code - allow us to write sizes which will have different behavior between verilog & terra (BAD!) -- tokensX, tokensY: optional - what is the size of the transaction? enables extra debugging (terra checks for regressions on second run) -- 'filename' is used for Terra -- We don't modify filenames in any way! -- header: a string to append at the very start of the file modules.fwriteSeq = memoize(function( filename, ty, filenameVerilog, passthrough, allowBadSizes, tokensX, tokensY, header, X ) err( type(filename)=="string", "filename must be a string") err( types.isType(ty), "type must be a type") rigel.expectBasic(ty) if passthrough==nil then passthrough=true end err( type(passthrough)=="boolean","fwriteSeq: passthrough must be bool" ) err(X==nil,"fwriteSeq: too many arguments") if filenameVerilog==nil then filenameVerilog=filename end local res = {kind="fwriteSeq", filename=filename, filenameVerilog=filenameVerilog, type=ty, inputType=ty, outputType=J.sel(passthrough,ty,types.null()), stateful=true, delay=2, sdfInput=SDF{1,1}, sdfOutput=SDF{1,1} } res.name = verilogSanitize("fwriteSeq_"..filename.."_"..tostring(ty)) function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sfile = systolicModule:add( S.module.file( filenameVerilog, ty, true, passthrough, false, true, nil, header ):instantiate("fwritefile") ) local printInst if DARKROOM_VERBOSE then printInst = systolicModule:add( S.module.print( ty, "fwrite O %h", true):instantiate("printInst") ) end local inp = S.parameter("process_input", ty ) local nilinp = S.parameter("process_nilinp", types.null() ) local CE = S.CE("CE") local pipelines = {} if DARKROOM_VERBOSE then table.insert( pipelines, printInst:process(inp) ) end systolicModule:addFunction( S.lambda("process", inp, sfile:write(inp), "process_output", pipelines, nil,CE ) ) local resetpipe={} table.insert(resetpipe,sfile:reset()) -- verilator: NOT SUPPORTED systolicModule:addFunction( S.lambda("reset", nilinp, nil, "process_reset", resetpipe, S.parameter("reset", types.bool() ) ) ) return systolicModule end res = rigel.newFunction(res) if terralib~=nil then res.terraModule = MT.fwriteSeq( res, filename,ty,passthrough, allowBadSizes, tokensX, tokensY, header ) end return res end) local function readAll(file) local f = io.open(file, "rb") local content = f:read("*all") f:close() return content end -- this is a Handshake triggered counter. -- it accepts an input value V of type TY. -- Then produces N tokens (from V to V+(N-1)*stride) modules.triggeredCounter = memoize(function(TY, N, stride, framed, X) err( types.isType(TY),"triggeredCounter: TY must be type") err( rigel.expectBasic(TY), "triggeredCounter: TY should be basic") err( TY:isNumber(), "triggeredCounter: type must be numeric rigel type, but is "..tostring(TY)) if stride==nil then stride=1 end err( type(stride)=="number", "triggeredCounter: stride should be number") if framed==nil then framed=false end assert(type(framed)=="boolean") assert(X==nil) err(type(N)=="number", "triggeredCounter: N must be number") local res = {kind="triggeredCounter"} res.inputType = types.rv(types.Par(TY)) if framed then res.outputType = types.rRvV(types.Seq(types.Par(TY),N,1)) else res.outputType = types.rRvV(types.Par(TY)) end res.sdfInput = SDF{1,N} res.sdfOutput = SDF{1,1} res.stateful=true res.delay = 3 res.name = "TriggeredCounter_"..verilogSanitize(tostring(TY)).."_"..tostring(N) if terralib~=nil then res.terraModule = MT.triggeredCounter(res,TY,N,stride) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sinp = S.parameter( "inp", TY ) local sPhase = systolicModule:add( Ssugar.regByConstructor( TY, fpgamodules.sumwrap(TY,N-1) ):CE(true):setReset(0):instantiate("phase") ) local reg = systolicModule:add( S.module.reg( TY,true ):instantiate("buffer") ) local reading = S.eq(sPhase:get(),S.constant(0,TY)):disablePipelining() local out = S.select( reading, sinp, reg:get()+(sPhase:get()*S.constant(stride,TY)) ) local pipelines = {} table.insert(pipelines, reg:set( sinp, reading ) ) table.insert( pipelines, sPhase:setBy( S.constant(1,TY) ) ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", sinp, S.tuple{out,S.constant(true,types.bool())}, "process_output", pipelines, nil, CE) ) systolicModule:addFunction( S.lambda("ready", S.parameter("readyinp",types.null()), reading, "ready", {} ) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {sPhase:reset()},S.parameter("reset",types.bool()) ) ) return systolicModule end return modules.liftHandshake(modules.waitOnInput( rigel.newFunction(res) )) end) -- this output one trigger token after N inputs modules.triggerCounter = memoize(function(N_orig) --err(type(N)=="number", "triggerCounter: N must be number") local N = Uniform(N_orig) local res = {kind="triggerCounter"} res.inputType = types.rv(types.Par(types.Trigger)) res.outputType = types.rvV(types.Par(types.Trigger)) res.sdfInput = SDF{1,1} res.sdfOutput = SDF{1,N} res.stateful=true res.delay=0 res.name = J.sanitize("TriggerCounter_"..tostring(N_orig)) res.includeMap = N:getInstances() if terralib~=nil then res.terraModule = MT.triggerCounter(res,N) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sPhase = systolicModule:add( Ssugar.regByConstructor( types.uint(32), fpgamodules.sumwrap(types.uint(32),N-1) ):CE(true):setReset(0):instantiate("phase") ) --local done = S.eq(sPhase:get(),S.constant(N-1,types.uint(32))):disablePipelining() local done = S.eq( sPhase:get(),Uniform(N-1):toSystolic(types.uint(32),systolicModule) ):disablePipelining() local out = S.tuple{S.constant(types.Trigger:fakeValue(),types.Trigger),done} local pipelines = {} table.insert( pipelines, sPhase:setBy( S.constant(1,types.uint(32)) ) ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", S.parameter( "inp", types.Trigger ), out, "process_output", pipelines, nil, CE) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {sPhase:reset()},S.parameter("reset",types.bool()) ) ) return systolicModule end return modules.liftHandshake(modules.liftDecimate( rigel.newFunction(res), true )) end) -- just counts from 0....N-1 local counterInner = memoize(function(ty,N,X) err( types.isType(ty), "counter: type must be rigel type") err( ty:isUint() or ty:isInt(), "counter: type must be uint or int") assert(X==nil) assert(Uniform.isUniform(N)) J.err( N:ge(1):assertAlwaysTrue(), "modules.counter: N must be >= 1, but is: "..tostring(N) ) local res = {kind="counter"} res.inputType = types.rv(types.Par(types.Trigger)) res.outputType = types.rv(types.Par(ty)) res.sdfInput = SDF{1,1} res.sdfOutput = SDF{1,1} res.stateful=true res.delay=0 res.name = J.sanitize("Counter_"..tostring(ty).."_"..tostring(N)) res.instanceMap=N:getInstances() res.requires = {} N:appendRequires(res.requires) res.provides = {} N:appendProvides(res.provides) if terralib~=nil then res.terraModule = MT.counter(res,ty,N) end function res.makeSystolic() local systolicModule = Ssugar.moduleConstructor(res.name) local sPhase = systolicModule:add( Ssugar.regByConstructor( ty, fpgamodules.sumwrap(ty,N-1) ):CE(true):setReset(0):instantiate("phase") ) local pipelines = {} table.insert( pipelines, sPhase:setBy( S.constant(1,ty) ) ) local CE = S.CE("CE") systolicModule:addFunction( S.lambda("process", S.parameter( "inp", types.Trigger ), sPhase:get(), "process_output", pipelines, nil, CE) ) systolicModule:addFunction( S.lambda("reset", S.parameter("r",types.null()), nil, "ro", {sPhase:reset()},S.parameter("reset",types.bool()) ) ) return systolicModule end local res = rigel.newFunction(res) return res end) modules.counter = function(ty,N_orig) return counterInner(ty,Uniform(N_orig)) end modules.toVarlen = memoize( function(ty,cnt) err( types.isType(ty), "toVarlen: type must be rigel type" ) err( types.isBasic(ty),"toVarlen: input should be basic" ) err(type(cnt)=="number", "toVarlen: cnt must be number") local res = {kind="toVarlen"} res.inputType = types.Handshake(ty) res.outputType = types.HandshakeVarlen(ty) res.sdfInput = SDF{1,1} res.sdfOutput = SDF{1,1} res.stateful=true res.delay=0 res.name = sanitize("ToVarlen_"..tostring(ty).."_"..tostring(cnt)) function res.makeSystolic() local vstring = [[ module ]]..res.name..[[(input wire CLK, input wire reset, input wire []]..(ty:verilogBits())..[[:0] process_input, output wire []]..(ty:verilogBits()+1)..[[:0] process_output, input wire ready_downstream, output wire ready); parameter INSTANCE_NAME="INST"; // value 0 means we're not in a frame (waiting for data) reg [31:0] count = 32'd0; reg []]..(ty:verilogBits())..[[:0] pbuf; // top bit is valid bit assign ready = ready_downstream; assign process_output[]]..(ty:verilogBits())..[[:0] = pbuf; assign process_output[]]..(ty:verilogBits()+1)..[[] = (count>32'd0) || pbuf[]]..(ty:verilogBits())..[[]; always @(posedge CLK) begin if(reset) begin count <= 32'd0; pbuf <= ]]..(ty:verilogBits()+1)..[['d0; end else begin if (ready_downstream) begin pbuf <= process_input; if (process_input[]]..(ty:verilogBits())..[[]) begin if (count==32'd]]..(cnt-1)..[[) begin count <= 32'd0; end else begin count <= count+32'd1; end end end end end endmodule ]] local fns = {} fns.reset = S.lambda( "reset", S.parameter("resetinp",types.null()), S.null(), "resetout",nil,S.parameter("reset",types.bool())) local inp = S.parameter("process_input",types.lower(res.inputType)) fns.process = S.lambda("process",inp,S.tuple{S.constant(ty:fakeValue(),ty),S.constant(true,types.bool()),S.constant(true,types.bool())}, "process_output") local downstreamReady = S.parameter("ready_downstream", types.bool()) fns.ready = S.lambda("ready", downstreamReady, downstreamReady, "ready" ) local ToVarlenSys = systolic.module.new(res.name, fns, {}, true,nil, vstring,{process=0,reset=0}) return ToVarlenSys end return rigel.newFunction(res) end) -- extraPortIsWrite: should the extra port be a write port? modules.reg = memoize(function(ty,initial,extraPortIsWrite,read1bits,X) if read1bits==nil then read1bits=32 end assert(type(read1bits)=="number") assert(types.isType(ty)) assert(ty:isData()) ty:checkLuaValue(initial) assert(X==nil) J.err( ty:verilogBits()<32 or ty:verilogBits()%read1bits==0,"reg: request type '"..tostring(ty).."' of bits '"..(ty:verilogBits()).."' must be divisible by "..read1bits) local tab = {name=J.sanitize("Reg_"..tostring(ty).."_read1bits"..tostring(read1bits).."_extraPortIsWrite"..tostring(extraPortIsWrite).."_init"..tostring(initial)), stateful=true, functions={}} if extraPortIsWrite==true then tab.functions.write1 = rigel.newFunction{name="write1",inputType=types.rv(types.Par(ty)),outputType=types.Interface(),sdfInput=SDF{1,1},sdfOutput=SDF{1,1},stateful=true,delay=0} else tab.functions.read1 = rigel.newFunction{name="read1",inputType=types.Interface(),outputType=types.rv(types.Par(ty)),sdfInput=SDF{1,1},sdfOutput=SDF{1,1},stateful=false,delay=0} end tab.functions.read = rigel.newFunction{name="read",inputType=types.rv(types.Par(types.Uint(32))),outputType=types.rv(types.Par(types.Bits(read1bits))),sdfInput=SDF{1,1},sdfOutput=SDF{1,1},stateful=false,delay=0} tab.functions.write = rigel.newFunction{name="write",inputType=types.rv(types.Par(types.Tuple{types.Uint(32),types.Bits(read1bits)})),outputType=types.Interface(),sdfInput=SDF{1,1},sdfOutput=SDF{1,1},stateful=true,delay=0} local res = rigel.newModule(tab) --assert(res.size==nil) --res.size = ty:verilogBits() assert(res.type==nil) res.type = ty assert(res.init==nil) res.init=initial function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) local vstr = {res:vHeader()..[=[ reg []=]..(read1bits-1)..[=[:0] r[]=]..(math.max(ty:verilogBits()/read1bits,1)-1)..[=[:0]; ]=]} table.insert(vstr,[=[ assign read_output = r[read_input]; ]=]) if extraPortIsWrite~=true then if ty:verilogBits()<32 then table.insert(vstr,"assign read1_output = r[0]["..(ty:verilogBits()-1)..":0];\n") else for i=0,(ty:verilogBits()/read1bits)-1 do table.insert(vstr,"assign read1_output["..((i+1)*read1bits-1)..":"..(i*read1bits).."] = r["..i.."];\n") end end end table.insert(vstr,[=[ always @(posedge CLK) begin if (write_CE && write_valid) begin r[write_input[31:0]] <= write_input[63:32]; end]=]) if extraPortIsWrite==true then table.insert(vstr," else if(write1_CE && write1_valid) begin\n") if ty:verilogBits()<32 then table.insert(vstr,[=[r[0] <= {]=]..(32-ty:verilogBits()).."'d0,write1_input};\n") else for i=0,(ty:verilogBits()/read1bits)-1 do table.insert(vstr,"r["..i.."] = write1_input["..((i+1)*read1bits-1)..":"..(i*read1bits).."];\n") end end table.insert(vstr,"end\n") end table.insert(vstr,[=[ end endmodule ]=]) s:verilog(table.concat(vstr,"")) return s end if terralib~=nil then res.terraModule = MT.reg(ty,initial,extraPortIsWrite,read1bits) end return res end) modules.shiftRegister = J.memoize(function(ty, N, clear ) assert( types.isType(ty) ) assert( ty:isSchedule() ) assert( type(N)=="number" ) err( N>0, "shift register with 0 delay?" ) if clear==nil then clear=false end local modname = J.sanitize("ShiftRegisterDELAY"..tostring(N).."_"..tostring(ty)) local res = rigel.newFunction{ inputType = types.rv(ty), outputType = types.rv(ty), name = modname, delay=N, stateful=true, sdfInput=SDF{1,1}, sdfOutput=SDF{1,1}, generator="ShiftRegister" } if terralib~=nil then res.terraModule = MT.shiftRegister( res, ty, N ) end function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) local verilog = {res:vHeader()} if ty:lower():verilogBits()==0 then -- do nothing! it's empty -- elseif N<10 then elseif N<10 then -- it's possible ty is a trigger... if ty:lower():verilogBits()>0 then for i=1,N do table.insert(verilog,"reg ["..(ty:lower():verilogBits()-1)..":0] DELAY_"..i..";\n") end table.insert(verilog,"assign "..res:vOutput().." = DELAY_"..N..";\n") table.insert(verilog,[[always @(posedge CLK) begin ]]) if clear then table.insert(verilog,[[ if( reset ) begin ]]) for i=1,N do table.insert(verilog," DELAY_"..i.." <= "..(ty:lower():verilogBits()).."'d0;\n") end table.insert(verilog,[[ end else ]]) end table.insert(verilog,[[ if( process_CE ) begin DELAY_1 <= ]]..res:vInput()..[[; ]]) for i=2,N do table.insert(verilog," DELAY_"..i.." <= DELAY_"..(i-1)..";\n") end table.insert(verilog,[[ end end ]]) end else local nearestN = J.nearestPowerOf2(N) local addrBits = math.log(nearestN)/math.log(2) -- for i=1,nearestN do -- table.insert(verilog,ty:lower():verilogBits()) -- table.insert(verilog,"'d0") -- if i<nearestN then table.insert(verilog,",") end -- end table.insert(verilog, [[ reg []]..(addrBits-1)..[[:0] writeAddr = ]]..addrBits..[['d]]..(N%nearestN)..[[; reg []]..(addrBits-1)..[[:0] readAddr = ]]..addrBits..[['d0; reg []]..(ty:lower():verilogBits()-1)..[[:0] ram []]..(nearestN-1)..[[:0]; assign ]]..res:vOutput()..[[ = ram[readAddr]; reg [31:0] i; reg [31:0] j; always @(posedge CLK) begin ]]) if clear then table.insert(verilog,[[ if( reset ) begin for(i=0; i<]]..nearestN..[[-1; i=i+1) begin for(j=0; j<]]..(ty:lower():verilogBits())..[[; j=j+1) begin ram[i][j] = 1'b0; end end end else]]) end table.insert(verilog,[[ if( process_CE ) begin ram[writeAddr] <= ]]..res:vInput()..[[; readAddr <= readAddr + ]]..addrBits..[['d1; writeAddr <= writeAddr + ]]..addrBits..[['d1; end end ]]) end table.insert(verilog,[[ endmodule ]]) s:verilog(table.concat(verilog)) return s end return res end) modules.FanOutRoundRobin = J.memoize(function( ty, N ) assert( types.isType(ty) ) assert( ty:isSchedule() ) assert( type(N)=="number" ) err( N>1, "fan out round robin must have at least 2 streams" ) local res = rigel.newFunction{ name=J.sanitize("FanOutRoundRobin_"..tostring(ty).."_N"..tostring(N)), inputType = types.RV(ty), outputType = types.Array2d(types.RV(ty),N), delay=0, stateful=true, sdfInput=SDF{1,1}, sdfOutput=SDF(J.broadcast({1,N},N)) } if terralib~=nil then res.terraModule = MT.FanOutRoundRobin( res, ty, N ) end function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) local verilog = {res:vHeader()} table.insert(verilog,[[ reg [7:0] phase; reg [31:0] cnt; // wire []]..((N*ty:verilogBits())-1)..[[:0] process_output_data; // wire []]..(N-1)..[[:0] process_output_valid; // assign process_output = {process_output_valid,process_output_data}; ]]) local readyDS = res:vOutputReady().."[0]" local processOutputList = {} for i=0,N-1 do table.insert(processOutputList,res:vInputData()) table.insert(processOutputList,"("..res:vInputValid().." && phase==8'd"..i..")") if i>0 then readyDS = "(phase==8'd"..i..")?("..res:vOutputReady().."["..i.."]):("..readyDS..")" end end table.insert(verilog,[[ assign ]]..res:vInputReady()..[[ = ]]..readyDS..[[; assign ]]..res:vOutput()..[[ = {]]..table.concat(J.reverse(processOutputList),",")..[[}; always @(posedge CLK) begin if (reset) begin phase <= 8'd0; cnt <= 32'd0; end else begin if (]]..res:vInputValid()..[[ && ]]..res:vInputReady()..[[ ) begin cnt <= cnt + 32'd1; if ( phase == 8'd]]..(N-1)..[[ ) begin phase <= 8'd0; end else begin phase <= phase + 8'd1; end // $display("FanOut Advance to Phase %d cnt %d",phase, cnt); end // $display("FANOUT ph %d vi %d rds %b",phase,]]..res:vInputValid()..[[,]]..res:vOutputReady()..[[); end end ]]) table.insert(verilog,[[ endmodule ]]) s:verilog(table.concat(verilog)) return s end return res end) modules.FanInRoundRobin = J.memoize(function( ty, N ) assert( types.isType(ty) ) assert( ty:isSchedule() ) assert( type(N)=="number" ) err( N>1, "fan in round robin must have at least 2 streams" ) local res = rigel.newFunction{ name=J.sanitize("FanInRoundRobin_"..tostring(ty).."_N"..tostring(N)), inputType = types.Array2d(types.RV(ty),N), outputType = types.RV(ty), delay=0, stateful=true, sdfInput=SDF(J.broadcast({1,N},N)), sdfOutput=SDF{1,1} } if terralib~=nil then res.terraModule = MT.FanInRoundRobin( res, ty, N ) end function res.makeSystolic() local C = require "generators.examplescommon" local s = C.automaticSystolicStub(res) local verilog = {res:vHeader()} table.insert(verilog,[[ reg [7:0] phase; reg [31:0] cnt; // wire []]..((N*ty:verilogBits())-1)..[[:0] process_input_data; // assign process_input_data = process_input[]]..((N*ty:verilogBits())-1)..[[:0]; // wire []]..(N-1)..[[:0] process_input_valid; // assign process_input_valid = process_input[]]..((N*ty:verilogBits())+N-1)..[[:]]..((N*ty:verilogBits()))..[[]; ]]) local outputValid = "process_input["..(ty:verilogBits()).."]" local outputData = "process_input["..(ty:verilogBits()-1)..":0]" for i=0,N-1 do table.insert(verilog," assign "..res:vInputReady().."["..i.."] = "..res:vOutputReady().." && (phase==8'd"..i..");\n") if i>0 then outputValid = "(phase==8'd"..i..")?(process_input["..((i+1)*(ty:verilogBits()+1)-1).."]):("..outputValid..")" outputData = "(phase==8'd"..i..")?(process_input["..((ty:verilogBits()+1)*(i+1)-2)..":"..((ty:verilogBits()+1)*i).."]):("..outputData..")" end end table.insert(verilog,[[ assign ]]..res:vOutputValid()..[[ = ]]..outputValid..[[; assign ]]..res:vOutputData()..[[ = ]]..outputData..[[; always @(posedge CLK) begin if (reset) begin phase <= 8'd0; cnt <= 32'd0; end else begin if (]]..res:vOutputReady()..[[ && ]]..res:vOutputValid()..[[ ) begin if ( phase == 8'd]]..(N-1)..[[ ) begin phase <= 8'd0; end else begin phase <= phase + 8'd1; end cnt <= cnt + 32'd1; // $display("FanIn advance to Phase %d cnt %d",phase,cnt); end // $display("FANIN ph %d ri %b vo %d ro %d", phase, ]]..res:vInputReady()..","..res:vOutputValid()..","..res:vOutputReady()..[[); end end ]]) table.insert(verilog,[[ endmodule ]]) s:verilog(table.concat(verilog)) return s end return res end) return modules
--- --- system: Movesystem --- local MoveSystem = Concord.system({pool = {"position", "heading", "movement"}}) function MoveSystem:init() print("MoveSystem:init()") end local function turnEntity(map, e, direction) if direction == "LEFT" then -- simply rotate our entity on the spot in the 4 possible compass directions if e.heading.dir == "N" then e.heading.dir = "W" elseif e.heading.dir == "W" then e.heading.dir = "S" elseif e.heading.dir == "S" then e.heading.dir = "E" elseif e.heading.dir == "E" then e.heading.dir = "N" end elseif direction == "RIGHT" then -- simply rotate our entity on the spot in the 4 possible compass directions if e.heading.dir == "N" then e.heading.dir = "E" elseif e.heading.dir == "E" then e.heading.dir = "S" elseif e.heading.dir == "S" then e.heading.dir = "W" elseif e.heading.dir == "W" then e.heading.dir = "N" end else error("Invalid entity direction: " .. direction) end end local function stepEntity(map, e, stepDirection) local direction = Vector() local currentPos = Vector(e.position.x, e.position.y) -- determine our position offset for the step if e.heading.dir == "N" then direction = Vector.dir("up") elseif e.heading.dir == "S" then direction = Vector.dir("down") elseif e.heading.dir == "E" then direction = Vector.dir("right") elseif e.heading.dir == "W" then direction = Vector.dir("left") end local newPos if stepDirection == "FWD" then newPos = currentPos + direction elseif stepDirection == "BACK" then newPos = currentPos - direction else error("Invalid step direction: " .. stepDirection) end -- step entity into the new position if map:valid(newPos) and map[newPos.y][newPos.x] == 0 then e.position.x, e.position.y = newPos:split() end end function MoveSystem:update(dt) local map = self:getWorld():getResource("map") for _, e in ipairs(self.pool) do if e.movement.command == "FWD" or e.movement.command == "BACK" then stepEntity(map, e, e.movement.command) elseif e.movement.command == "LEFT" or e.movement.command == "RIGHT" then turnEntity(map, e, e.movement.command) else error("Invalid Movement command: " .. e.movement.command) end -- discard the movement component as it has been processed. e:remove("movement") end end return MoveSystem
------------------------------------------------------------------------------------------------------------------------ -- Proposal: -- https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0192-button_subscription_response_from_hmi.md ------------------------------------------------------------------------------------------------------------------------ -- Description: Check that SDL processes UnsubscribeButton RPC for two Apps with different <button> parameters ------------------------------------------------------------------------------------------------------------------------ -- In case: -- 1. Mobile App1 requests SubscribeButton(<button_1>) -- 2. Mobile App2 requests SubscribeButton(<button_2>) -- 3. Mobile App1 requests UnsubscribeButton(<button_1>) -- 4. Mobile App2 requests UnsubscribeButton(<button_2>) -- SDL does: -- - send Buttons.UnsubscribeButton(button_1, appId1) to HMI -- - send Buttons.UnsubscribeButton(button_2, appId2) to HMI -- - process successful responses from HMI -- - respond UnsubscribeButton(SUCCESS) to mobile Apps -- - send OnHashChange with updated hashId to mobile App1 and App2 after unsubscription -- In case: -- 5. HMI sends OnButtonEvent and OnButtonPress notifications for button_1 -- SDL does: -- - not transfer OnButtonEvent and OnButtonPress to App1 and to App2 -- In case: -- 6. HMI sends OnButtonEvent and OnButtonPress notifications for button_2 -- SDL does: -- - not transfer OnButtonEvent and OnButtonPress to App2 and App1 ------------------------------------------------------------------------------------------------------------------------ --[[ Required Shared libraries ]] local common = require('test_scripts/API/ButtonSubscription/commonButtonSubscription') --[[ Test Configuration ]] config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } config.application2.registerAppInterfaceParams.appHMIType = { "NAVIGATION" } --[[ Local Variables ]] local appSessionId1 = 1 local appSessionId2 = 2 local buttonName_1 = "PRESET_1" local buttonName_2 = "PRESET_0" --[[ Scenario ]] common.runner.Title("Preconditions") common.runner.Step("Clean environment", common.preconditions) common.runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) common.runner.Step("App_1 registration", common.registerAppWOPTU, { appSessionId1 }) common.runner.Step("App_1 activation", common.activateApp, { appSessionId1 }) common.runner.Step("App_2 registration", common.registerAppWOPTU, { appSessionId2 }) common.runner.Step("App_2 activation, Set App_1 HMI Level to Limited", common.activateApp, { appSessionId2 }) common.runner.Step("App_1 SubscribeButton on " .. buttonName_1 .." button", common.rpcSuccess, { appSessionId1, "SubscribeButton", buttonName_1 }) common.runner.Step("App_2 SubscribeButton on " .. buttonName_2 .. " button", common.rpcSuccess, { appSessionId2, "SubscribeButton", buttonName_2 }) common.runner.Step("Press on " .. buttonName_1 .. " button", common.buttonPressMultipleApps, { appSessionId1, buttonName_1, common.isExpected, common.isNotExpected }) common.runner.Step("Press on " .. buttonName_2 .. " button", common.buttonPressMultipleApps, { appSessionId2, buttonName_2, common.isNotExpected, common.isExpected }) common.runner.Title("Test") common.runner.Step("App_1 UnsubscribeButton on " .. buttonName_1 .." button", common.rpcSuccess, { appSessionId1, "UnsubscribeButton", buttonName_1 }) common.runner.Step("Press on " .. buttonName_1 .. " button", common.buttonPressMultipleApps, { appSessionId1, buttonName_1, common.isNotExpected, common.isNotExpected }) common.runner.Step("Press on " .. buttonName_2 .. " button", common.buttonPressMultipleApps, { appSessionId2, buttonName_2, common.isNotExpected, common.isExpected }) common.runner.Step("App_2 UnsubscribeButton on " .. buttonName_2 .. " button", common.rpcSuccess, { appSessionId2, "UnsubscribeButton", buttonName_2 }) common.runner.Step("Press on " .. buttonName_1 .. " button", common.buttonPressMultipleApps, { appSessionId1, buttonName_1, common.isNotExpected, common.isNotExpected }) common.runner.Step("Press on " .. buttonName_2 .. " button", common.buttonPressMultipleApps, { appSessionId2, buttonName_2, common.isNotExpected, common.isNotExpected }) common.runner.Title("Postconditions") common.runner.Step("Stop SDL", common.postconditions)
--[[ *** Artemis *** Written by : echomap --]] local _, L = ...; ------------------------------------------------------------------------- -- Traps Utils ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- -- Traps Setup ------------------------------------------------------------------------- function Artemis.TrapFrame_Initialize() Artemis.DebugMsg("TrapFrame_Initialize Called") -- Artemis.Traps_NumTraps = 5; Artemis.Trap_Traps = { [L["Artemis_Trap_IMMOLATION"] ]= 0, [L["Artemis_Trap_FREEZING"] ]= 0, [L["Artemis_Trap_FROST"] ]= 0, [L["Artemis_Trap_EXPLOSIVE"] ]= 0, [L["Artemis_Trap_SNAKE"] ]= 0, } --Artemis.Trap_Traps[ L["Artemis_Trap_IMMOLATION"] ]= 0 --Artemis.DebugMsg("TrapFrame_Initialize: test immo = ".. L["Artemis_Trap_IMMOLATION"] ) -- Reset the available abilities. Artemis.DebugMsg("TrapFrame_Initialize: Reset the available abilities." ) for spell, id in pairs( Artemis.Trap_Traps ) do Artemis.DebugMsg("TrapFrame_Initialize: Traps =" .. tostring(spell) ) if (id > 0) then Artemis.Trap_Traps[spellName] = 0 end end -- Artemis.DebugMsg("TrapFrame_Initialize: Setup abilities." ) local i = 1 while true do local spellName, spellRank = GetSpellBookItemName(i, BOOKTYPE_SPELL) if not spellName then do break end end -- use spellName and spellRank here --DEFAULT_CHAT_FRAME:AddMessage( spellName .. '(' .. spellRank .. ')' ) --Artemis.DebugMsg("TrapFrame_Initialize: spellName=" .. tostring(spellName) .. '(' .. spellRank .. ')' ) if (Artemis.Trap_Traps[spellName]) then Artemis.Trap_Traps[spellName] = i Artemis.DebugMsg("TrapFrame_Initialize: found a trap at idx: " .. tostring(i) ) end i = i + 1 end -- local count = 0; for spell, id in pairs(Artemis.Trap_Traps) do if (id > 0) then count = count + 1; Artemis.DebugMsg("TrapFrame_Initialize: spell=" .. tostring(spell) ) local button = getglobal("ArtemisTrapFrame_Trap"..count); button:SetAttribute("type", "spell"); button:SetAttribute("spell", spell); local buttontext = getglobal("ArtemisTrapFrame_Trap"..count.."Icon"); local textureName = GetSpellBookItemTexture(spell) local tex = ArtemisTrapFrame:CreateTexture(textureName, "BACKGROUND") --tex:SetAllPoints() --tex:SetColorTexture(1, 1, 1, 0.5) --tex:SetTexture(textureName) if(textureName~=nil) then Artemis.DebugMsg("TrapFrame_Initialize: textureName=" .. tostring(textureName) ) SetItemButtonTexture(button,textureName) else Artemis.DebugMsg("TrapFrame_Initialize: setting choice of texture") buttontext:SetTexture("Interface\\Icons\\Ability_Druid_DemoralizingRoar"); end button.SpellID = id; button:Show(); -- local name, rank, icon, castTime, minRange, maxRange, spellId = GetSpellInfo(spell) --Artemis.PrintMsg("TrapFrame_Initialize: spell=" .. tostring(id) ) --Artemis.view.buttonspelllist[spellId] = "ArtemisTrapFrame_Trap"..count.."Cooldown" local myCooldown = getglobal("ArtemisTrapFrame_Trap"..count.."Cooldown"); Artemis.view.buttonspelllist[spellId] = {} Artemis.view.buttonspelllist[spellId].myCooldown = myCooldown Artemis.view.buttonspelllist[spellId].myType = "TRAP" end end -- Hide the buttons we don't need. for i = count + 1, Artemis.Traps_NumTraps, 1 do local button = getglobal("ArtemisTrapFrame_Trap"..i); button:Hide(); end Artemis.DebugMsg("TrapFrame_Initialize: Orient: " .. tostring(ArtemisDBChar.options.setuptrapsorientation)) -- Vertical if( ArtemisDBChar.options.setuptrapsorientation) then ArtemisTrapFrame:SetSize(60,250); local pAnchor = getglobal("ArtemisTrapFrame_Anchor"); pAnchor:ClearAllPoints() pAnchor:SetPoint( "TOP", "ArtemisTrapFrame" , "TOP" , 0 , -12 ) for count = 1, Artemis.Traps_NumTraps do local button = getglobal("ArtemisTrapFrame_Trap"..count); button:ClearAllPoints() --obj:SetPoint(point, relativeTo, relativePoint, ofsx, ofsy); button:SetPoint( "TOP", pAnchor , "BOTTOM" ); pAnchor = button end end --Horizontal <AbsDimension x="240" y="60"/> if( ArtemisDBChar.options.setuptrapsorientation==nil or not ArtemisDBChar.options.setuptrapsorientation ) then ArtemisTrapFrame:SetSize(250,60); local pAnchor = getglobal("ArtemisTrapFrame_Anchor"); pAnchor:ClearAllPoints() pAnchor:SetPoint( "LEFT", "ArtemisTrapFrame" , "LEFT" , 0 , -12 ) for count = 1, Artemis.Traps_NumTraps do local button = getglobal("ArtemisTrapFrame_Trap"..count); button:ClearAllPoints() --obj:SetPoint(point, relativeTo, relativePoint, ofsx, ofsy); button:SetPoint( "LEFT", pAnchor , "RIGHT" ); pAnchor = button end end -- Artemis.Trap_UpdateLock() end ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- -- Traps Gui ------------------------------------------------------------------------- function Artemis.TrapButton_OnEnter(self) --Artemis.DebugMsg("TrapButton_OnEnter Called"); Artemis:ShowTooltip(self, self:GetAttribute("spell"), "TRAP" ) end function Artemis.TrapButton_OnLeave() --Artemis.DebugMsg("TrapButton_OnLeave Called"); GameTooltip:Hide() end function Artemis.Trap_ToggleLock() Artemis.DebugMsg("Trap_ToggleLock Called, is: " .. tostring(ArtemisDBChar.options.TrapFrameUnlocked)); if(ArtemisDBChar.options.TrapFrameUnlocked) then ArtemisDBChar.options.TrapFrameUnlocked = false; Artemis.Trap_UpdateLock(); else ArtemisDBChar.options.TrapFrameUnlocked = true; Artemis.Trap_UpdateLock(); end end function Artemis.Trap_UpdateLock() Artemis.DebugMsg("Trap_UpdateLock Called"); if(not ArtemisDBChar.options.TrapFrameUnlocked) then ArtemisTrapLockNorm:SetTexture("Interface\\AddOns\\Artemis\\Media\\LockButton-Locked-Up"); ArtemisTrapLockPush:SetTexture("Interface\\AddOns\\Artemis\\Media\\LockButton-Locked-Down"); ArtemisTrapFrame_Back:Hide(); ArtemisTrapFrame_Text:Hide(); Artemis.DebugMsg("Trap_UpdateLock lock"); else ArtemisTrapLockNorm:SetTexture("Interface\\AddOns\\Artemis\\Media\\LockButton-Unlocked-Up"); ArtemisTrapLockPush:SetTexture("Interface\\AddOns\\Artemis\\Media\\LockButton-Unlocked-Down"); ArtemisTrapFrame_Back:Show(); ArtemisTrapFrame_Text:Show(); Artemis.DebugMsg("Trap_UpdateLock unlock"); end end function Artemis.Trap_OnLoad() Artemis.DebugMsg("Trap_OnLoad Called"); _, class = UnitClass("player"); if class=="HUNTER" then --[[ this:RegisterEvent("VARIABLES_LOADED"); this:RegisterEvent("SPELLS_CHANGED"); this:RegisterEvent("LEARNED_SPELL_IN_TAB"); this:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN"); --]] else ArtemisTrapFrame:Hide(); end end function Artemis.Trap_OnEvent() Artemis.DebugMsg("Trap_OnEvent Called"); end ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- -- Traps Utils ------------------------------------------------------------------------- function Artemis.TrapsPostClick(self) Artemis.printMsg("TrapsPostClick Called"); end function Artemis.DoClickTrapButton_1() local button = getglobal("ArtemisTrapFrame_Trap"..1); button:Click("LeftButton",false) end function Artemis.DoClickTrapButton_2() local button = getglobal("ArtemisTrapFrame_Trap"..2); button:Click("LeftButton",false) end function Artemis.DoClickTrapButton_3() local button = getglobal("ArtemisTrapFrame_Trap"..3); button:Click("LeftButton",false) end function Artemis.DoClickTrapButton_4() local button = getglobal("ArtemisTrapFrame_Trap"..4); button:Click("LeftButton",false) end function Artemis.DoClickTrapButton_5() local button = getglobal("ArtemisTrapFrame_Trap"..5); button:Click("LeftButton",false) end function Artemis.DoClickTrapButton_6() local button = getglobal("ArtemisTrapFrame_Trap"..6); button:Click("LeftButton",false) end ------------------------------------------------------------------------- -------------------------------------------------------------------------
object_mobile_som_scorching_terror = object_mobile_som_shared_scorching_terror:new { } ObjectTemplates:addTemplate(object_mobile_som_scorching_terror, "object/mobile/som/scorching_terror.iff")
local Formspec = class.extend("Formspec") creox.gui.Formspec = Formspec local function argument_parser(argument) local string_argument = "" if type(argument) == "table" then for index, value in pairs(argument) do string_argument = string_argument .. tostring(value) .. (argument[index+1] ~= nil and "," or "") end else string_argument = tostring(argument) end return string_argument end local function element_parser(element) local element_type = element[1] local string_arguments = "" for index, argument in pairs(element[2]) do string_arguments = string_arguments .. argument_parser(argument) if (element[2][index+1] ~= nil) then if type(argument) == "table" then string_arguments = string_arguments .. ";" else string_arguments = string_arguments .. "," end end end return ("%s[%s]"):format(element_type, string_arguments) end local function elements_parser(elements) local formspec = "" for index, element in pairs(elements) do formspec = formspec .. element_parser(element) .. "\n" end return formspec end function Formspec:init() self._formspec = {} end function Formspec:get() local gui = elements_parser(self._formspec) --minetest.log(gui) return gui end function Formspec:element(name, ...) table.insert(self._formspec, {name, {...}}) end --> Element Manipulators function Formspec:set_canvas_size(width, height, fixed) self:element("size", {width, height}, fixed) end function Formspec:use_real_coordinates() self:element("real_coordinates", true) end function Formspec:set_version(version) self:element("formspec_version", version) end function Formspec:position(x, y) self:element("position", {x, y}) end function Formspec:anchor(x, y) self:element("anchor", {x, y}) end function Formspec:padding(x, y) self:element("padding", {x, y}) end function Formspec:no_prepend() self:element("no_prepend") end function Formspec:container_end() self:element("container_end") end function Formspec:scroll_container_end() self:element("scroll_container_end") end function Formspec:background_color(color, fullscreen, foreground_color) self:element("bgcolor", {color}, {fullscreen}, {foreground_color}) end function Formspec:background_texture(x, y, width, height, texture, auto_clip) self:element("background", {x, y}, {width, height}, {texture}, {auto_clip}) end function Formspec:background9_texture(x, y, width, height, texture, auto_clip, middle) self:element("background9", {x, y}, {width, height}, {texture}, {auto_clip}, {middle}) end function Formspec:field_close_on_enter(name, close_on_enter) self:element("field_close_on_enter", {name}, {close_on_enter}) end function Formspec:scrollbar_options(options) self:element("scrollbaroptions", options) end function Formspec:table_options(options) self:element("tableoptions", options) end function Formspec:style_type(selectors, props) self:element("style_type", {selectors}, {props}) end function Formspec:set_focus(name, force) self:element("set_focus", {name}, {force}) end --> Elements function Formspec:container(x, y) self:element("container", {x, y}) end function Formspec:scroll_container(x, y, width, height, scrollbar_name, orienation, scroll_factor) self:element("scroll_container", {x, y}, {width, height}, {scrollbar_name}, {orienation}, {scroll_factor}) end function Formspec:list(inventory_location, list_name, x, y, width, height, start_index) self:element("list", {inventory_location}, {list_name}, {x, y}, {width, height}, {start_index}) end function Formspec:list_string(inventory_location, list_name) self:element("listring", inventory_location, list_name) end function Formspec:list_colors(slot_background_normal, slot_background_hover, slot_border_color, tooltip_background_color, tooltip_fontcolor) self:element("listcolors", {slot_background_normal}, {slot_background_hover}, {slot_border_color}, {tooltip_background_color}, {tooltip_fontcolor}) end function Formspec:tool_tip(x, y, width, height, text, background_color, font_color) self:element("tooltip", {x, y}, {width, height}, {text}, {background_color}, {font_color}) end function Formspec:tool_tip_element(gui_element_name, text, background_color, font_color) self:element("tooltip", {gui_element_name}, {text}, {background_color}, {font_color}) end function Formspec:image(x, y, width, height, texture) self:element("image", {x, y}, {width, height}, {texture}) end function Formspec:animated_image(x, y, width, height, name, texture, frame_count, frame_duration, frame_start) self:element("animated_image", {x, y}, {width, height}, {name}, {texture}, {frame_count}, {frame_duration}, {frame_start}) end function Formspec:model(x, y, width, height, name, mesh, textures, rotation, continuous, mouse_control, frame_loop_range, animation_speed) self:element("model", {x, y}, {width, height}, {name}, {mesh}, {textures}, {rotation}, {continuous}, {mouse_control}, {frame_loop_range}, {animation_speed}) end function Formspec:item_image(x, y, width, height, item_name) self:element("item_image", {x, y}, {width, height}, item_name) end function Formspec:password_field(x, y, width, height, name, label) self:element("pwdfield", {x, y}, {width, height}, {name}, {label}) end function Formspec:field(name, label, default) self:element("field", {name}, {label}, {default}) end function Formspec:text_area(x, y, width ,height, name, label, default) self:element("textarea", {x, y}, {width ,height}, {name}, {label}, {default}) end function Formspec:label(x, y, label) self:element("label", {x, y}, {label}) end function Formspec:hypertext(x, y, width, height, name, text) self:element("hypertext", {x, y}, {width, height}, {name}, {text}) end function Formspec:vertical_label(x, y, label) self:element("hypertext", {x, y}, {label}) end function Formspec:button(x, y, width, height, name, label) self:element("button", {x, y}, {width, height}, {name}, {label}) end function Formspec:image_button(x, y, width, height, texture, name, label, no_clip, drawborder, pressed_texture) self:element("image_button", {x, y}, {width, height}, {texture}, {name}, {label}, {no_clip}, {drawborder}, {pressed_texture}) end function Formspec:item_image_button(x, y, width, height, item_name, name, label) self:element("item_image_button", {x, y}, {width, height}, {item_name}, {name}, {label}) end function Formspec:text_list(x, y, width, height, name, elements, selected_id, transparent) self:element("textlist", {x, y}, {width, height}, {name}, {elements}, {selected_id}, {transparent}) end function Formspec:tab_header(x, y, width, height, name, captions, current_tab, transparent, draw_border) self:element("tabheader", {x, y}, {width, height}, {name}, {captions}, {current_tab}, {transparent}, {draw_border}) end function Formspec:box(x, y, width, height, color) self:element("box", {x, y}, {width, height}, {color}) end function Formspec:dropdown(x, y, width, height, name, items, selected_id, index_event) self:element("dropdown", {x, y}, {width, height}, {name}, {items}, {selected_id}, {index_event}) end function Formspec:checkbox(x, y, width, height, orientation, name, value) self:element("checkbox", {x, y}, {width, height}, {orientation}, {name}, {value}) end function Formspec:table(x, y, width, height, name, cells, selected_index) self:element("table", {x, y}, {width, height}, {name}, {cells}, {selected_index}) end function Formspec:table_columns(type_options) self:element("tablecolumns", {type_options}) end function Formspec:custom(element_name, ...) self:element(element_name, ...) end
local Upgradeable = Class(function(self,inst) self.inst = inst self.onstageadvancefn = nil self.onupgradefn = nil self.upgradetype = "DEFAULT" self.stage = 1 self.numstages = 3 self.upgradesperstage = 5 self.numupgrades = 0 end) function Upgradeable:SetStage(num) self.stage = num end function Upgradeable:AdvanceStage() self.stage = self.stage + 1 self.numupgrades = 0 if self.onstageadvancefn then return self.onstageadvancefn(self.inst) end end function Upgradeable:CanUpgrade() return self.stage < self.numstages end function Upgradeable:Upgrade(obj) if not self:CanUpgrade() then return false end self.numupgrades = self.numupgrades + obj.components.upgrader.upgradevalue if obj.components.stackable then obj.components.stackable:Get(1):Remove() else obj:Remove() end if self.onupgradefn then self.onupgradefn(self.inst) end if self:CanUpgrade() and self.numupgrades >= self.upgradesperstage then self:AdvanceStage() end return true end function Upgradeable:OnSave() local data = {} data.numupgrades = self.numupgrades data.stage = self.stage return data end function Upgradeable:OnLoad(data) self.numupgrades = data.numupgrades self.stage = data.stage end return Upgradeable
--[[ Salim PERCHY 17/06/2021 Copyright (c) 2021, INRIA All rights reserved. MFX Team --]] -- Disclaimer print( "\nCopyright (c) 2021, INRIA\n".. "All rights reserved.\n".. "\nSupports via Wave fuction collapse.\n\n".. "MFX Team\n" ) -- PARAMETERS models = "models.txt" model_file = "model.stl" voxel_size = 0.5 overhang_angle = 45 rotation_z = 0 no_model_lift = false models_folder = true batch_processing = true stats_file = "batch_stats.txt" n_models = 0 n_successes = 0 output_voxelizer = "out" wave_method_output= "segments.csv" exec_time = 0 -- Create list of models files_models = {} for model in io.lines(Path..models) do if (models_folder) then files_models[#files_models+1] = 'models/'..model else files_models[#files_models+1] = model end end -- Tweaks idx = ui_combo("Model", files_models) model_file = files_models[idx+1] voxel_size = ui_scalar("Voxel size (mm)", voxel_size, 0.1, 2.0) rotation_z = ui_scalarBox("Rot Z (°)", rotation_z, 5) overhang_angle = ui_number("Overhang angle (°)", overhang_angle, 0, 90) no_model_lift = ui_bool("No bed gap", no_model_lift) function pipeline() -- Statistics if (batch_processing) then io.write('Model: '..model_file..'\n') n_models = n_models + 1 end -- Voxelizer print("\nCalling voxelizer...\n") t0 = os.time() lift_arg = "" if (no_model_lift) then lift_arg = " -nolifting" end exec_code = os.execute("VoxSurf.exe".." -model "..model_file.." -mm "..voxel_size.." -angle "..overhang_angle.." -rotz "..rotation_z..lift_arg) t1 = os.time() exec_time = os.difftime(t1-t0) if (exec_code ~= 0) then error("Voxelizer failed!\n") end print( "\n\ndone!".. "\nVoxelizer executed in "..exec_time.."s\n" ) -- Statistics if (batch_processing) then if (exec_code ~= 0) then io.write("Voxelixer: failed\n") model_file = model_file - 1 else io.write("Voxelixer: passed\n") end io.write("Voxelizer time: "..exec_time.."s\n") end if (exec_code == 0) then -- Wave function collapse print("\nCalling wave function collapse method...\n") t0 = os.time() exec_code = os.execute("ProcSupGen.exe".." "..output_voxelizer) t1 = os.time() exec_time = os.difftime(t1-t0) if (exec_code ~= 0) then error("Supports failed!\n") end print( "\n\ndone!".. "\nWave function collapse method executed in "..exec_time.."s\n" ) exec_time_wave_func = exec_time -- Statistics if (batch_processing) then if (exec_code ~= 0) then io.write("Supports: failed\n") else io.write("Supports: passed\n") n_successes = n_successes + 1 end io.write("Supports time: "..exec_time.."s\n") end end if (not batch_processing) then -- IceSL script print("\Calling IceSL script...\n") pipeline_call = true modelfile = model_file segmentsfile = wave_method_output rotZ = rotation_z t0 = os.time() dofile("script.lua") t1 = os.time() exec_time = os.difftime(t1-t0) print( "\n\ndone!".. "\nIceSL script executed in "..exec_time.."s\n" ) end if (batch_processing) then io.write('---------------------------\n') end end if (batch_processing) then -- open statistics file batch_stats = io.open(Path..stats_file, "a") io.output(batch_stats) -- call pipeline (without IceSL rendering) for every model for _,filename in ipairs(files_models) do model_file = filename..'.stl' pipeline() os.execute('del 2p-init-out.slab.vox 2p-synth-out.slab.vox out.slab.info out.slab.points out.slab.vox segments.csv') end io.write('\n\n') io.write('N. of models processed: '..n_models..'\n') io.write('Supports succeeded: '..n_successes..'\n') io.write('Supports failed: '..(n_models - n_successes)..'\n') io.write('Success rate: '..math.floor(n_successes / n_models * 100.0)..'%\n') io.close(batch_stats) else model_file = model_file..'.stl' pipeline() end emit(Void)
local composer = require( "composer" ) local json = require "json" local myData = require ("mydata") local widget = require( "widget" ) local loadsave = require( "loadsave" ) local statisticsScene = composer.newScene() --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --> GENERAL FUNCTIONS --------------------------------------------------------------------------------- local function onAlert( event ) if ( event.action == "clicked" ) then if system.getInfo("platformName")=="Android" then native.requestExit() else os.exit() end end end local goBack = function(event) if (event.phase=="ended") then backSound() composer.gotoScene("playerScene", {effect = "fade", time = 100}) end end function goBackPlayerStat(event) if (tutOverlay==false) then backSound() composer.gotoScene("playerScene", {effect = "fade", time = 100}) end end local function networkListener( event ) if ( event.isError ) then print( "Network error: ", event.response ) local alert = native.showAlert( "EliteHax", "Oops.. A network error occured...", { "Close" }, onAlert ) else print ( "RESPONSE: " .. event.response ) local t = json.decode( base64Decode(event.response) ) if ( t == nil ) then print ("EMPTY T") local alert = native.showAlert( "EliteHax", "Oops.. A network error occured...", { "Close" }, onAlert ) end --Attack&Defense Rate = 0 if (t.attack == "0") then attack_wr = 0 attack_lr = 0 else attack_wr = t.attack_w/t.attack*100 attack_lr = t.attack_l/t.attack*100 end if (t.defense == "0") then defense_wr = 0 defense_lr = 0 else defense_wr = t.defense_w/t.defense*100 defense_lr = t.defense_l/t.defense*100 end --Attack Stats myData.attackMStat.text = "Attacks: "..format_thousand(t.attack).."\nAttacks Won: "..format_thousand(t.attack_w).." ("..string.format("%4.2f",attack_wr).."%)\nAttacks Lost: "..format_thousand(t.attack_l).." ("..string.format("%4.2f",attack_lr).."%)" myData.defenseMStat.text = "Defenses: "..format_thousand(t.defense).."\nDefenses Won: "..format_thousand(t.defense_w).." ("..string.format("%4.2f",defense_wr).."%)\nDefenses Lost: "..format_thousand(t.defense_l).." ("..string.format("%4.2f",defense_lr).."%)" myData.moneyMStat.text = "Money Won: +$"..format_thousand(t.money_w).."\nMoney Lost: -$"..format_thousand(t.money_l).."\nBest Attack: +$"..format_thousand(t.best_attack).."\nHighest Loss: -$"..format_thousand(t.worst_defense) myData.upgradesMStat.text = "Total Upgrades: "..format_thousand(t.upgrades).."\nMoney Spent: $"..format_thousand(t.money_spent) --Money myData.moneyTextS.text = format_thousand(t.money) --Statistic if (string.len(t.user)>15) then myData.playerTextS.size = fontSize(42) end myData.playerTextS.text = t.user end end --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --> SCENE EVENTS --------------------------------------------------------------------------------- -- Scene Creation function statisticsScene:create(event) local group = self.view loginInfo = localToken() iconSize=300 --TOP myData.top_backgroundStat = display.newImageRect( "img/top_background.png",display.contentWidth-40, fontSize(100)) myData.top_backgroundStat.anchorX = 0.5 myData.top_backgroundStat.anchorY = 0 myData.top_backgroundStat.x, myData.top_backgroundStat.y = display.contentWidth/2,5+topPadding() changeImgColor(myData.top_backgroundStat) --Money myData.moneyTextS = display.newText("",115,myData.top_backgroundStat.y+myData.top_backgroundStat.height/2,native.systemFont, fontSize(48)) myData.moneyTextS.anchorX = 0 myData.moneyTextS.anchorY = 0.5 myData.moneyTextS:setFillColor( 0.9,0.9,0.9 ) --Player Name myData.playerTextS = display.newText("",display.contentWidth-250,myData.top_backgroundStat.y+myData.top_backgroundStat.height/2,native.systemFont, fontSize(48)) myData.playerTextS.anchorX = 0.5 myData.playerTextS.anchorY = 0.5 myData.playerTextS:setFillColor( 0.9,0.9,0.9 ) -- Attacking Stats Rectangle myData.attackRect = display.newImageRect( "img/statistics_attack.png",display.contentWidth-20,fontSize(320)) myData.attackRect.anchorX=0.5 myData.attackRect.anchorY=0 myData.attackRect.x, myData.attackRect.y = display.contentWidth/2,myData.top_background.y+myData.top_background.height+10 changeImgColor(myData.attackRect) --Attacking Statistic myData.attackMStat = display.newText("",myData.attackRect.x-myData.attackRect.width/2+40, myData.attackRect.y+fontSize(100) ,native.systemFont, fontSize(52)) myData.attackMStat.anchorX = 0 myData.attackMStat.anchorY = 0 myData.attackMStat:setFillColor( 0.9,0.9,0.9 ) -- Defense Stats Rectangle myData.defenseRect = display.newImageRect( "img/statistics_defense.png",display.contentWidth-20,fontSize(320)) myData.defenseRect.anchorX=0.5 myData.defenseRect.anchorY=0 myData.defenseRect.x, myData.defenseRect.y = display.contentWidth/2,myData.attackRect.y+myData.attackRect.height changeImgColor(myData.defenseRect) --Defense Statistic myData.defenseMStat = display.newText("",myData.attackRect.x-myData.attackRect.width/2+40, myData.defenseRect.y+fontSize(100),native.systemFont, fontSize(52)) myData.defenseMStat.anchorX = 0 myData.defenseMStat.anchorY = 0 myData.defenseMStat:setFillColor( 0.9,0.9,0.9 ) -- Money Stats Rectangle myData.moneyRect = display.newImageRect( "img/statistics_money.png",display.contentWidth-20,fontSize(380)) myData.moneyRect.anchorX=0.5 myData.moneyRect.anchorY=0 myData.moneyRect.x, myData.moneyRect.y = display.contentWidth/2,myData.defenseRect.y+myData.defenseRect.height changeImgColor(myData.moneyRect) --Money Statistic myData.moneyMStat = display.newText("",myData.attackRect.x-myData.attackRect.width/2+40, myData.moneyRect.y+fontSize(100) ,native.systemFont, fontSize(52)) myData.moneyMStat.anchorX = 0 myData.moneyMStat.anchorY = 0 myData.moneyMStat:setFillColor( 0.9,0.9,0.9 ) -- Upgrade Stats Rectangle myData.upgradesRect = display.newImageRect( "img/statistics_upgrade.png",display.contentWidth-20,fontSize(300)) myData.upgradesRect.anchorX=0.5 myData.upgradesRect.anchorY=0 myData.upgradesRect.x, myData.upgradesRect.y = display.contentWidth/2,myData.moneyRect.y+myData.moneyRect.height changeImgColor(myData.upgradesRect) --Upgrades Statistic myData.upgradesMStat = display.newText("",myData.attackRect.x-myData.attackRect.width/2+40, myData.upgradesRect.y+fontSize(110),native.systemFont, fontSize(52)) myData.upgradesMStat.anchorX = 0 myData.upgradesMStat.anchorY = 0 myData.upgradesMStat:setFillColor( 0.9,0.9,0.9 ) --Background myData.background = display.newImage("img/background.jpg") myData.background:scale(4,8) myData.background.alpha = 0.1 changeImgColor(myData.background) -- Back Button myData.backButton = widget.newButton( { left = 20, top = display.actualContentHeight - (display.actualContentHeight/15) + topPadding(), width = display.contentWidth - 40, height = display.actualContentHeight/15-5, defaultFile = buttonColor1080, -- overFile = "buttonOver.png", fontSize = fontSize(80), label = "Back", labelColor = tableColor1, onEvent = goBack } ) group:insert(myData.background) group:insert(myData.backButton) group:insert(myData.attackRect) group:insert(myData.attackMStat) group:insert(myData.defenseRect) group:insert(myData.defenseMStat) group:insert(myData.moneyRect) group:insert(myData.moneyMStat) group:insert(myData.upgradesRect) group:insert(myData.upgradesMStat) group:insert(myData.top_backgroundStat) group:insert(myData.moneyTextS) group:insert(myData.playerTextS) -- Button Listeners myData.backButton:addEventListener("tap",goBack) end -- Home Show function statisticsScene:show(event) local homeGroup = self.view if event.phase == "will" then -- Called when the scene is still off screen (but is about to come on screen). local tutCompleted = loadsave.loadTable( "playerStatTutorialStatus.json" ) if (tutCompleted == nil) or (tutCompleted.tutPlayerStat ~= true) then tutOverlay = true local sceneOverlayOptions = { time = 0, effect = "crossFade", params = { }, isModal = true } composer.showOverlay( "playerStatTutScene", sceneOverlayOptions) else tutOverlay = false end local headers = {} local body = "id="..string.urlEncode(loginInfo.token) local params = {} params.headers = headers params.body = body network.request( host().."getStats.php", "POST", networkListener, params ) end if event.phase == "did" then -- end end --------------------------------------------------------------------------------- --------------------------------------------------------------------------------- --> Listener setup --------------------------------------------------------------------------------- statisticsScene:addEventListener( "create", statisticsScene ) statisticsScene:addEventListener( "show", statisticsScene ) --------------------------------------------------------------------------------- return statisticsScene
object_draft_schematic_weapon_carbine_ee3_bounty = object_draft_schematic_weapon_shared_carbine_ee3_bounty:new { } ObjectTemplates:addTemplate(object_draft_schematic_weapon_carbine_ee3_bounty, "object/draft_schematic/weapon/carbine_ee3_bounty.iff")
-- Auto generated by post.py, do not edit return { ["subspace-item-extractor"] = { layers = { { filename = "__subspace_storage__/graphics/entity/item-extractor.png", width = 254, height = 242, shift = util.by_pixel(0.0, 1.0), hr_version = { filename = "__subspace_storage__/graphics/entity/item-extractor-hr.png", width = 506, height = 483, shift = util.by_pixel_hr(0.0, 1.5), scale = 0.5, }, }, { filename = "__subspace_storage__/graphics/entity/item-shadow.png", width = 111, height = 201, shift = util.by_pixel(176.5, 20.5), draw_as_shadow = true, hr_version = { filename = "__subspace_storage__/graphics/entity/item-shadow-hr.png", width = 222, height = 401, shift = util.by_pixel_hr(354.0, 41.5), scale = 0.5, draw_as_shadow = true, }, }, }, }, ["subspace-item-injector"] = { layers = { { filename = "__subspace_storage__/graphics/entity/item-injector.png", width = 254, height = 242, shift = util.by_pixel(0.0, 1.0), hr_version = { filename = "__subspace_storage__/graphics/entity/item-injector-hr.png", width = 506, height = 483, shift = util.by_pixel_hr(0.0, 1.5), scale = 0.5, }, }, { filename = "__subspace_storage__/graphics/entity/item-shadow.png", width = 111, height = 201, shift = util.by_pixel(176.5, 20.5), draw_as_shadow = true, hr_version = { filename = "__subspace_storage__/graphics/entity/item-shadow-hr.png", width = 222, height = 401, shift = util.by_pixel_hr(354.0, 41.5), scale = 0.5, draw_as_shadow = true, }, }, }, }, ["subspace-fluid-extractor"] = { layers = { { filename = "__subspace_storage__/graphics/entity/fluid-extractor.png", width = 256, height = 268, shift = util.by_pixel(0.0, 0.0), hr_version = { filename = "__subspace_storage__/graphics/entity/fluid-extractor-hr.png", width = 512, height = 534, shift = util.by_pixel_hr(0.0, 0.0), scale = 0.5, }, }, { filename = "__subspace_storage__/graphics/entity/fluid-shadow.png", width = 354, height = 226, shift = util.by_pixel(55.0, 25.0), draw_as_shadow = true, hr_version = { filename = "__subspace_storage__/graphics/entity/fluid-shadow-hr.png", width = 708, height = 453, shift = util.by_pixel_hr(111.0, 50.5), scale = 0.5, draw_as_shadow = true, }, }, }, }, ["subspace-fluid-injector"] = { layers = { { filename = "__subspace_storage__/graphics/entity/fluid-injector.png", width = 256, height = 268, shift = util.by_pixel(0.0, 0.0), hr_version = { filename = "__subspace_storage__/graphics/entity/fluid-injector-hr.png", width = 512, height = 534, shift = util.by_pixel_hr(0.0, 0.0), scale = 0.5, }, }, { filename = "__subspace_storage__/graphics/entity/fluid-shadow.png", width = 354, height = 226, shift = util.by_pixel(55.0, 25.0), draw_as_shadow = true, hr_version = { filename = "__subspace_storage__/graphics/entity/fluid-shadow-hr.png", width = 708, height = 453, shift = util.by_pixel_hr(111.0, 50.5), scale = 0.5, draw_as_shadow = true, }, }, }, }, ["subspace-electricity-extractor"] = { layers = { { filename = "__subspace_storage__/graphics/entity/electricity-extractor.png", width = 256, height = 251, shift = util.by_pixel(0.0, 1.5), hr_version = { filename = "__subspace_storage__/graphics/entity/electricity-extractor-hr.png", width = 512, height = 502, shift = util.by_pixel_hr(0.0, 3.0), scale = 0.5, }, }, { filename = "__subspace_storage__/graphics/entity/electricity-shadow.png", width = 345, height = 229, shift = util.by_pixel(59.5, 12.5), draw_as_shadow = true, hr_version = { filename = "__subspace_storage__/graphics/entity/electricity-shadow-hr.png", width = 693, height = 457, shift = util.by_pixel_hr(118.5, 25.5), scale = 0.5, draw_as_shadow = true, }, }, }, }, ["subspace-electricity-injector"] = { layers = { { filename = "__subspace_storage__/graphics/entity/electricity-injector.png", width = 256, height = 251, shift = util.by_pixel(0.0, 1.5), hr_version = { filename = "__subspace_storage__/graphics/entity/electricity-injector-hr.png", width = 512, height = 502, shift = util.by_pixel_hr(0.0, 3.0), scale = 0.5, }, }, { filename = "__subspace_storage__/graphics/entity/electricity-shadow.png", width = 345, height = 229, shift = util.by_pixel(59.5, 12.5), draw_as_shadow = true, hr_version = { filename = "__subspace_storage__/graphics/entity/electricity-shadow-hr.png", width = 693, height = 457, shift = util.by_pixel_hr(118.5, 25.5), scale = 0.5, draw_as_shadow = true, }, }, }, }, }
-- credit to atom0s for help with decompiling -- Decompiled using luadec 2.2 rev: for Lua 5.1 from https://github.com/viruscamp/luadec return { ConstCfg = { FIGHTING_COLOR = { "#cff0000", "#cff6b11", "#cff6b11", "#c00ffb4", "#c00ffb4", "#c00ffb4" }, FIGHTING_LV = { "[Dangerous]", "[Difficult]", "[Hard]", "[Average]", "[Easy]", "[Effortless]" }, FUNC_ID = 86, FightingUpWay = { "锻炼", "支援装备", "副卡", "芯片" }, FightingUpWay2 = { "英雄", "支援装备", "副卡", "芯片" }, ITEM_INFO = { "Gold", "Strength" }, RULE_DESC = "#c000000Hero Trial Rules #n#r#r#r#r#r#c000000[Hero Trials]: #r#r#c5c5c5cHero Trials are available everyday. Spend Stamina to challenge these trials and get different character shards! #r#r#r#r#c000000[Activation Requirements]: #r#r#c5c5c5cYou will gradually open different hero's trials as you complete Peacekeeping stages. #r#r#r#r#c000000[Challenge Times]: #r#r#c5c5c5c1. Each trial has a daily challenge attempt limit. #r#r#c5c5c5c2. Daily challenge attempts are refreshed every day at 05:00. #r#r#c5c5c5c3. If you fail a challenge, that attempt will not be deducted. There's no harm in trying! So go Plus Ultra!!!#r#r", }, StageCfg = { { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 1-3", EngTitle = "To be a hero", Fighting1 = 2240, Fighting2 = 2810, Fighting3 = 3380, Fighting4 = 4060, Fighting5 = 4880, FirstPassReward = { 1012124, 5 }, Id = 1, OpenLevel = 17, Reward = 7001, RewardNum = 1, ShowReward = { 1012124 }, StageDesc = "Challenge the stage to get Izuku Midoriya Shards.", StageId = 370101, StageImage = "碎片本_关卡图_124", Title = "Hero's Aspiration", Type = "治安事件通关", Values = { 280103 }, class = "124", subTitle = "碎片本_1", }, { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 2-3", EngTitle = "Blazing Thunder", Fighting1 = 2960, Fighting2 = 3710, Fighting3 = 4460, Fighting4 = 5360, Fighting5 = 6440, FirstPassReward = { 1012110, 5 }, Id = 2, OpenLevel = 21, Reward = 7002, RewardNum = 1, ShowReward = { 1012110 }, StageDesc = "Challenge the stage to get Denki Kaminari Shards.", StageId = 370102, StageImage = "碎片本_关卡图_110", Title = "Flash of Lightning", Type = "治安事件通关", Values = { 280203 }, class = "110", subTitle = "碎片本_2", }, { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 3-4", EngTitle = "Man's faith", Fighting1 = 4180, Fighting2 = 5230, Fighting3 = 6280, Fighting4 = 7540, Fighting5 = 9040, FirstPassReward = { 1012113, 5 }, Id = 3, OpenLevel = 23, Reward = 7003, RewardNum = 1, ShowReward = { 1012113 }, StageDesc = "Challenge the stage to get Eijiro Kirishima Shards.", StageId = 370103, StageImage = "碎片本_关卡图_113", Title = "Manly Resolution", Type = "治安事件通关", Values = { 280304 }, class = "113", subTitle = "碎片本_3", }, { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 4-5", EngTitle = "Engine Overdriving", Fighting1 = 5520, Fighting2 = 6890, Fighting3 = 8260, Fighting4 = 9920, Fighting5 = 11900, FirstPassReward = { 1012106, 5 }, Id = 4, OpenLevel = 25, Reward = 7006, RewardNum = 1, ShowReward = { 1012106 }, StageDesc = "Challenge the stage to get Tenya Iida Shards.", StageId = 370106, StageImage = "碎片本_关卡图_106", Title = "Efficient Execution", Type = "治安事件通关", Values = { 280405 }, class = "106", subTitle = "碎片本_6", }, { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 5-6", EngTitle = "Smile Like Sunshine", Fighting1 = 5900, Fighting2 = 7380, Fighting3 = 8860, Fighting4 = 10640, Fighting5 = 12760, FirstPassReward = { 1012107, 5 }, Id = 5, OpenLevel = 27, Reward = 7005, RewardNum = 1, ShowReward = { 1012107 }, StageDesc = "Challenge the stage to get Ochaco Uraraka Shards.", StageId = 370105, StageImage = "碎片本_关卡图_107", Title = "Pure Kindness", Type = "治安事件通关", Values = { 280506 }, class = "107", subTitle = "碎片本_5", }, { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 6-6", EngTitle = "Potencial Unlimited", Fighting1 = 7940, Fighting2 = 9920, Fighting3 = 11900, Fighting4 = 14280, Fighting5 = 17140, FirstPassReward = { 1012120, 5 }, Id = 6, OpenLevel = 29, Reward = 7004, RewardNum = 1, ShowReward = { 1012120 }, StageDesc = "Challenge the stage to get Minoru Mineta Shards.", StageId = 370104, StageImage = "碎片本_关卡图_120", Title = "Unexpected Surprise", Type = "治安事件通关", Values = { 280606 }, class = "120", subTitle = "碎片本_4", }, { ConsumeStrength = 25, Count = 1, DayTimes = 2, Desc = "Complete Peacekeeping 7-6", EngTitle = "Rhythm Spirit", Fighting1 = 12340, Fighting2 = 15430, Fighting3 = 18520, Fighting4 = 22220, Fighting5 = 26660, FirstPassReward = { 1012114, 5 }, Id = 7, OpenLevel = 33, Reward = 7007, RewardNum = 1, ShowReward = { 1012114 }, StageDesc = "Challenge a stage to get Tsuyu shards.", StageId = 370107, StageImage = "碎片本_关卡图_114", Title = "Spirit Pillar", Type = "治安事件通关", Values = { 280706 }, class = "114", subTitle = "碎片本_13", }, }, StageId2Id = { [370101] = 1, [370102] = 2, [370103] = 3, [370104] = 6, [370105] = 5, [370106] = 4, [370107] = 7 }, }
require "resty.nettle.types.dsa" require "resty.nettle.types.ecc" local hogweed = require "resty.nettle.hogweed" local mpz = require "resty.nettle.mpz" local ffi = require "ffi" local ffi_gc = ffi.gc local ffi_new = ffi.new local ffi_cdef = ffi.cdef local ffi_typeof = ffi.typeof local setmetatable = setmetatable local type = type ffi_cdef[[ void nettle_ecc_point_init(struct ecc_point *p, const struct ecc_curve *ecc); void nettle_ecc_point_clear(struct ecc_point *p); int nettle_ecc_point_set(struct ecc_point *p, const mpz_t x, const mpz_t y); void nettle_ecc_point_get(const struct ecc_point *p, mpz_t x, mpz_t y); void nettle_ecc_scalar_init(struct ecc_scalar *s, const struct ecc_curve *ecc); void nettle_ecc_scalar_clear(struct ecc_scalar *s); int nettle_ecc_scalar_set(struct ecc_scalar *s, const mpz_t z); void nettle_ecc_scalar_get(const struct ecc_scalar *s, mpz_t z); void nettle_ecc_scalar_random(struct ecc_scalar *s, void *random_ctx, nettle_random_func *random); void nettle_ecc_point_mul(struct ecc_point *r, const struct ecc_scalar *n, const struct ecc_point *p); void nettle_ecc_point_mul_g(struct ecc_point *r, const struct ecc_scalar *n); ]] local pub = ffi_typeof "NETTLE_ECC_POINT[1]" local curves = {} do local pcall = pcall local function curve(name) local o, c = pcall(function() return hogweed[name] end) if o then return c end end curves["P-192"] = curve("nettle_secp_192r1") curves["P-224"] = curve("nettle_secp_224r1") curves["P-256"] = curve("nettle_secp_256r1") curves["P-384"] = curve("nettle_secp_384r1") curves["P-521"] = curve("nettle_secp_521r1") end local curve = {} curve.__index = curve local point = {} point.__index = point function point.new(c, x, y, base) local context = ffi_gc(ffi_new(pub), hogweed.nettle_ecc_point_clear) if type(c) == "cdata" then hogweed.nettle_ecc_point_init(context, c) elseif curves[c] then hogweed.nettle_ecc_point_init(context, curves[c]) else return nil, "invalid curve for ECC point" end if x and y then local mx, my, err mx, err = mpz.new(x, base) if not mx then return nil, err end my, err = mpz.new(y, base) if not my then return nil, err end if hogweed.nettle_ecc_point_set(context, mx, my) ~= 1 then return nil, "unable to set ECC point" end end return setmetatable({ context = context }, point) end local ecc = { point = point, curve = curve } ecc.__index = ecc return ecc
local AccountInfo = { Name = "AccountInfo", Type = "System", Namespace = "C_AccountInfo", Functions = { { Name = "GetIDFromBattleNetAccountGUID", Type = "Function", Arguments = { { Name = "battleNetAccountGUID", Type = "string", Nilable = false }, }, Returns = { { Name = "battleNetAccountID", Type = "number", Nilable = false }, }, }, { Name = "IsGUIDBattleNetAccountType", Type = "Function", Arguments = { { Name = "guid", Type = "string", Nilable = false }, }, Returns = { { Name = "isBNet", Type = "bool", Nilable = false }, }, }, { Name = "IsGUIDRelatedToLocalAccount", Type = "Function", Arguments = { { Name = "guid", Type = "string", Nilable = false }, }, Returns = { { Name = "isLocalUser", Type = "bool", Nilable = false }, }, }, }, Events = { }, Tables = { }, }; APIDocumentation:AddDocumentationTable(AccountInfo);
--[[ Copyright 2019 The Spin-Scenario Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==============================================================================-]] -- example: show how to create the density state (similar for operator). B0{"500 MHz"} -- set up spin system. local config = { spin = '1H 1H 1H', zeeman = '2 scalar -38.8 Hz 3 scalar 412 Hz', jcoupling = '1 3 scalar 17 Hz 2 3 scalar 11 Hz' } local sys = spin_system(config) local I1x = 0.5*(sys:state{ 1, 'I+' } + sys:state{ 1, 'I-' }) local I1x_ = sys:expr_state('I1x') print(I1x_-I1x) -- should result zero vector. local I1xI3x = 0.25*(sys:state{ 1, 'I+', 3, 'I+' } + sys:state{ 1, 'I+', 3, 'I-' } + sys:state{ 1, 'I-', 3, 'I+' } + sys:state{ 1, 'I-', 3, 'I-'}) local I1xI3x_ = sys:expr_state('I1xI3x') local I1yI3y = -0.25*(sys:state{ 1, 'I+', 3, 'I+'} - sys:state{ 1, 'I+', 3, 'I-'} - sys:state{ 1, 'I-', 3, 'I+'} + sys:state{ 1, 'I-', 3, 'I-'}) local I1yI3y_ = sys:expr_state('I1yI3y') --print(I1xI3x-I1xI3x_) -- should result zero vector. --print(I1yI3y-I1yI3y_) -- should result zero vector. local rho = sys:expr_state('2*I1xI3x-0.5*I2xI3y') print(rho) write('rho.txt', rho)
-- -- Product Event Handler -- Handle data events digital_twin_message_handler(data.device_sn, data)
--0 off 1-3 surface 4-6 radar ----LOADING local mod_storage = minetest.get_mod_storage() if mod_storage:get_string("show") == "" then mod_storage:set_string("show", "true") end --avoid opengl errors by delay minetest.register_on_connect(function() minetest.after(1, function() if mod_storage:get_string("show") == "true" then minetest.ui.minimap:show() minetest.ui.minimap:set_mode(mod_storage:get_int("set_mode")) minetest.ui.minimap:set_shape(mod_storage:get_int("set_shape")) end --show_minimap_form_spec() end) end) ------ ---MODIFYING minetest.register_chatcommand("mapsettings", { description = "Modify minimap settings", func = function() print("test") show_minimap_form_spec() end}) function show_minimap_form_spec() minetest.show_formspec("hud_settings", "size[6,6]" .. "bgcolor[#000000;false]" .. "button_exit[5.2,-0.15;1,0.7;close;×]" .. "label[0.6,0;Advanced Minimap Settings]" .. --visible setting "label[0.1,1.1;Map_Visible]" .. "dropdown[2.1,1;1.25;Map_Visible;true,false;1]".. --mode setting- surface & radar "label[0.1,2.1;Map_Mode]" .. "dropdown[2.1,2;2.25;Map_Mode;Surface X1,Surface X2,Surface X4,Radar X1,Radar X2,Radar X4;1]".. --map shape "label[0.1,3.1;Map_Shape]" .. "dropdown[2.1,3;1.75;Map_Shape;Square,Round;1]" --"button[3.75,5.5;2.5,1;Save_And_Apply;Save & Apply]" ) end --recieve fields minetest.register_on_formspec_input(function(formname, fields) if formname == "hud_settings" and not fields.quit then if fields.Map_Visible then print(fields.Map_Visible) if fields.Map_Visible == "true" then minetest.ui.minimap:show() mod_storage:set_string("show", "true") elseif fields.Map_Visible == "false" then minetest.ui.minimap:hide() mod_storage:set_string("show", "false") end end if fields.Map_Mode then if fields.Map_Mode == "Surface X1" then mod_storage:set_int("set_mode", 1) minetest.ui.minimap:set_mode(1) elseif fields.Map_Mode == "Surface X2" then mod_storage:set_int("set_mode", 2) minetest.ui.minimap:set_mode(2) elseif fields.Map_Mode == "Surface X4" then mod_storage:set_int("set_mode", 3) minetest.ui.minimap:set_mode(3) elseif fields.Map_Mode == "Radar X1" then mod_storage:set_int("set_mode", 4) minetest.ui.minimap:set_mode(4) elseif fields.Map_Mode == "Radar X2" then mod_storage:set_int("set_mode", 5) minetest.ui.minimap:set_mode(5) elseif fields.Map_Mode == "Radar X4" then mod_storage:set_int("set_mode", 6) minetest.ui.minimap:set_mode(6) end end if fields.Map_Shape then if fields.Map_Shape == "Square" then minetest.ui.minimap:set_shape(0) mod_storage:set_int("set_shape", 0) elseif fields.Map_Shape == "Round" then minetest.ui.minimap:set_shape(1) mod_storage:set_int("set_shape", 1) end end end end) --- local localplayer minetest.register_on_connect(function() localplayer = minetest.localplayer end) minetest.register_globalstep(function(dtime) if localplayer then --print(localplayer:get_key_pressed()) end end)
-- modified from https://github.com/hrsh7th/nvim-compe local compe = require('compe') compe.setup { enabled = true; autocomplete = true; debug = false; min_length = 1; preselect = 'enable'; throttle_time = 80; source_timeout = 200; resolve_timeout = 800; incomplete_delay = 400; max_abbr_width = 100; max_kind_width = 100; max_menu_width = 100; documentation = { border = { '', '' ,'', ' ', '', '', '', ' ' }, -- the border option is the same as `|help nvim_open_win|` winhighlight = "NormalFloat:CompeDocumentation,FloatBorder:CompeDocumentationBorder", max_width = 120, min_width = 60, max_height = math.floor(vim.o.lines * 0.3), min_height = 1, }; source = { buffer = true; path = true; spell = true; calc = true; nvim_lsp = true; nvim_lua = true; }; } -- from https://github.com/neovim/nvim-lspconfig/wiki/Autocompletion local t = function(str) return vim.api.nvim_replace_termcodes(str, true, true, true) end local check_back_space = function() local col = vim.fn.col('.') - 1 if col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then return true else return false end end -- Use (s-)tab to: --- move to prev/next item in completion menuone --- jump to prev/next snippet's placeholder _G.tab_complete = function() if vim.fn.pumvisible() == 1 then return t "<C-n>" elseif check_back_space() then return t "<Tab>" else return vim.fn['compe#complete']() end end _G.s_tab_complete = function() if vim.fn.pumvisible() == 1 then return t "<C-p>" else return t "<S-Tab>" end end -- Mappings -- Note that some mappings are also in bottom of plugins.vim -- vim.api.nvim_set_keymap( -- "i", "<CR>", "compe#confirm(luaeval(\"require 'nvim-autopairs'.autopairs_cr()\"))", -- {expr = true } -- ) vim.api.nvim_set_keymap("i", "<Tab>", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "<Tab>", "v:lua.tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("s", "<S-Tab>", "v:lua.s_tab_complete()", {expr = true}) vim.api.nvim_set_keymap("i", "<C-g>", "compe#close('<C-e>')", {expr = true, silent = true})
fx_version 'cerulean' game 'gta5' author 'Kathryn2101' description 'qb-firejob' version '1.0.0' client_scripts { 'config.lua', 'client/main.lua', 'client/job.lua', 'client/gui.lua', } server_script 'server.lua' lua54 'yes'
local open=io.open local file2str_=function(path,str) local f=open(path,mode or "r") if f then str=f:read("*a") f:close() else print(string.format("Can't open file %q !",path)) end return str end local str2file_=function(str,path,append) local f=open(path,append and "a+" or "w") if f then f:write(str) f:close() end return path end file2str,str2file=file2str_,str2file_ -- extend local include_file_ local gsub=string.gsub local make_include_func=function(pat) local f,str f=function(path) str=file2str_(path) return pat and (gsub(str,pat,f)) or str end return f end include_file=function(path,pat) local f=make_include_func(pat) return f and f(path) end --~ print(include_file("ioio.lua","%<%<(.-)%>%>")) file2table=function(filepath,dst,hooks,dir,kv_pattern) local match,push=string.match,table.insert dst=dst or {} kv_pattern=kv_pattern or "^%s*(.-)%s+(.-)%s*$" local key,value,hook local fhandle=io.open(filepath) if fhandle then print("Parsing",filepath,"...") for line in fhandle:lines() do key,value=match(line,kv_pattern) hook=key and hooks[key] if hook then hook(value,dst,dir) end end fhandle:close() print("Success!") else print("Invalid filepath:",filepath) end return dst end
--INDOOR_DECOR registrations node_definition ={ description = "adventure_pack_1:armor", drawtype = "mesh", mesh = "armor.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"armor.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:armor","armor.box",node_definition,true) adv_core.register_object("adventure_pack_1:armor", 1, 0, 1, 0) node_definition ={ description = "adventure_pack_1:barrel_and_scrolls", drawtype = "mesh", mesh = "barrel_and_scrolls.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"barrel_and_scrolls.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:barrel_and_scrolls","barrel_and_scrolls.box",node_definition,true) adv_core.register_object("adventure_pack_1:barrel_and_scrolls", 0, 0, 1, 1) node_definition ={ description = "adventure_pack_1:bed", drawtype = "mesh", mesh = "bed.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"bunk_bed.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:bed","bed.box",node_definition,true) adv_core.register_object("adventure_pack_1:bed", 0, 1, 2, 1) node_definition ={ description = "adventure_pack_1:bed_cot", drawtype = "mesh", mesh = "bed_cot.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"bed_cot.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:bed_cot","bed_cot.box",node_definition,true) adv_core.register_object("adventure_pack_1:bed_cot", 0, 0, 2, 1) node_definition ={ description = "adventure_pack_1:big_stack_of_books", drawtype = "mesh", mesh = "big_stack_of_books.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"big_stack_of_books.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:big_stack_of_books","big_stack_of_books.box",node_definition,true) adv_core.register_object("adventure_pack_1:big_stack_of_books", 1, 1, 1, 1) node_definition ={ description = "adventure_pack_1:bucket", drawtype = "mesh", mesh = "bucket.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"bucket.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:bucket","bucket.box",node_definition,true) adv_core.register_object("adventure_pack_1:bucket", 0, 2, 0, 1) node_definition ={ description = "adventure_pack_1:bunk_bed", drawtype = "mesh", mesh = "bunk_bed.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"bunk_bed.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:bunk_bed","bunk_bed.box",node_definition,true) adv_core.register_object("adventure_pack_1:bunk_bed", 0, 1, 4, 2) node_definition ={ description = "adventure_pack_1:candlabra", drawtype = "mesh", mesh = "candlabra.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"candlabra.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:candlabra","candlabra.box",node_definition,true) adv_core.register_object("adventure_pack_1:candlabra", 1, 0, 0, 0) node_definition ={ description = "adventure_pack_1:case_of_barrels", drawtype = "mesh", mesh = "case_of_barrels.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"case_of_barrels.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:case_of_barrels","case_of_barrels.box",node_definition,true) adv_core.register_object("adventure_pack_1:case_of_barrels", 2, 0, 7, 0) node_definition ={ description = "adventure_pack_1:case_of_scrolls", drawtype = "mesh", mesh = "case_of_scrolls.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"case_of_scrolls.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:case_of_scrolls","case_of_scrolls.box",node_definition,true) adv_core.register_object("adventure_pack_1:case_of_scrolls", 0, 1, 3, 2) node_definition ={ description = "adventure_pack_1:chandelier", drawtype = "mesh", mesh = "chandelier.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"chandelier.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:chandelier","chandelier.box",node_definition,true) adv_core.register_object("adventure_pack_1:chandelier", 4, 1, 2, 1) node_definition ={ description = "adventure_pack_1:crates", drawtype = "mesh", mesh = "crates.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"crates.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:crates","crates.box",node_definition,true) adv_core.register_object("adventure_pack_1:crates", 1, 1, 8, 2) node_definition ={ description = "adventure_pack_1:drawing_table", drawtype = "mesh", mesh = "drawing_table.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"case_of_barrels.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:drawing_table","drawing_table.box",node_definition,true) adv_core.register_object("adventure_pack_1:drawing_table", 2, 0, 2, 2) node_definition ={ description = "adventure_pack_1:fish_barrel", drawtype = "mesh", mesh = "fish_barrel.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"fish_barrel.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:fish_barrel","fish_barrel.box",node_definition,true) adv_core.register_object("adventure_pack_1:fish_barrel", 0, 3, 2, 0) node_definition ={ description = "adventure_pack_1:food_plate", drawtype = "mesh", mesh = "food_plate.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"food_plate.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:food_plate","food_plate.box",node_definition,true) adv_core.register_object("adventure_pack_1:food_plate", 1, 1, 0, 0) node_definition ={ description = "adventure_pack_1:food_plate_2", drawtype = "mesh", mesh = "food_plate_2.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"food_plate.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:food_plate_2","food_plate.box",node_definition,true) adv_core.register_object("adventure_pack_1:food_plate_2", 1, 1, 0, 0) node_definition ={ description = "adventure_pack_1:food_plate_3", drawtype = "mesh", mesh = "food_plate_3.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"food_plate.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:food_plate_3","food_plate.box",node_definition,true) adv_core.register_object("adventure_pack_1:food_plate_3", 1, 1, 0, 0) node_definition ={ description = "adventure_pack_1:grandfather_clock", drawtype = "mesh", mesh = "grandfather_clock.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"grandfather_clock.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:grandfather_clock","grandfather_clock.box",node_definition,true) adv_core.register_object("adventure_pack_1:grandfather_clock", 2, 0, 4, 0) node_definition ={ description = "adventure_pack_1:lantern", drawtype = "mesh", mesh = "lantern.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"lantern.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:lantern","lantern.box",node_definition,true) adv_core.register_object("adventure_pack_1:lantern", 2, 0, 0, 0) node_definition ={ description = "adventure_pack_1:pen_and_quill", drawtype = "mesh", mesh = "pen_and_quill.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"pen_and_quill.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:pen_and_quill","pen_and_quill.box",node_definition,true) adv_core.register_object("adventure_pack_1:pen_and_quill", 0, 0, 0, 1) node_definition ={ description = "adventure_pack_1:plans_table", drawtype = "mesh", mesh = "plans_table.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"case_of_barrels.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:plans_table","plans_table.box",node_definition,true) adv_core.register_object("adventure_pack_1:plans_table", 2, 0, 2, 2) node_definition ={ description = "adventure_pack_1:scroll_case", drawtype = "mesh", mesh = "scroll_case.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"case_of_barrels.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:scroll_case","scroll_case.box",node_definition,true) adv_core.register_object("adventure_pack_1:scroll_case", 0, 0, 2, 3) node_definition ={ description = "adventure_pack_1:scrying_orb", drawtype = "mesh", mesh = "scrying_orb.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"scrying_orb.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:scrying_orb","scrying_orb.box",node_definition,true) adv_core.register_object("adventure_pack_1:scrying_orb", 3, 1, 1, 1) node_definition ={ description = "adventure_pack_1:small_bookcase", drawtype = "mesh", mesh = "small_bookcase.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"small_bookcase.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:small_bookcase","small_bookcase.box",node_definition,true) adv_core.register_object("adventure_pack_1:small_bookcase", 0, 0, 3, 3) node_definition ={ description = "adventure_pack_1:small_bookcase_2", drawtype = "mesh", mesh = "small_bookcase_2.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"small_bookcase.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:small_bookcase_2","small_bookcase_2.box",node_definition,true) adv_core.register_object("adventure_pack_1:small_bookcase_2", 0, 0, 3, 3) node_definition ={ description = "adventure_pack_1:sofa", drawtype = "mesh", mesh = "sofa.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"sofa.png"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:sofa","sofa.box",node_definition,true) adv_core.register_object("adventure_pack_1:sofa", 1, 0, 1, 4) node_definition ={ description = "adventure_pack_1:stack_of_books", drawtype = "mesh", mesh = "stack_of_books.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"stack_of_books.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:stack_of_books","stack_of_books.box",node_definition,true) adv_core.register_object("adventure_pack_1:stack_of_books", 1, 1, 1, 1) node_definition ={ description = "adventure_pack_1:weapons_case", drawtype = "mesh", mesh = "weapons_case.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"weapons_case.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:weapons_case","weapons_case.box",node_definition,true) adv_core.register_object("adventure_pack_1:weapons_case", 4, 1, 4, 1) node_definition ={ description = "adventure_pack_1:weapons_case_2", drawtype = "mesh", mesh = "weapons_case_2.obj", sunlight_propagates = true, paramtype2 = "facedir", tiles = {"weapons_case.jpg"}, groups = { oddly_breakable_by_hand=2 }, } autobox.register_node("adventure_pack_1:weapons_case_2","weapons_case.box",node_definition,true) adv_core.register_object("adventure_pack_1:weapons_case_2", 4, 1, 4, 1)
--Start of Global Scope--------------------------------------------------------- print('AppEngine Version: ' .. Engine.getVersion()) local helper = require 'helpers' local GREEN = {0, 200, 0} local RED = {200, 0, 0} local FILL_ALPHA = 100 local MM_TO_PROCESS = 10 --10mm slices local DELAY = 150 -- Create viewers local v2D = View.create('Viewer2D') local v3D = View.create('Viewer3D') --End of Global Scope----------------------------------------------------------- --Start of Function and Event Scope--------------------------------------------- local function main() local heightMap = Object.load('resources/heightMap.json') local minZ, maxZ = Image.getMinMax(heightMap) local zRange = maxZ - minZ local pixelSizeX, pixelSizeY = Image.getPixelSize(heightMap) local heightMapW, heightMapH = Image.getSize(heightMap) local deco3D = View.ImageDecoration.create() deco3D:setRange(heightMap:getMin(), heightMap:getMax() / 1.01) -- Correct the heightMaps origin, so it is centered on the x-axis local stepsize = math.ceil(MM_TO_PROCESS / pixelSizeY) -- convert mm to pixel steps -- Rotate 90° around x axis and translate to the base of the scanned image local rectangleBaseTransformation = Transform.createRigidAxisAngle3D({1, 0, 0}, math.pi / 2, 0, MM_TO_PROCESS / 2, minZ + zRange / 2) local scanBox = Shape3D.createBox(heightMapW * pixelSizeX, zRange * 1.2, MM_TO_PROCESS, rectangleBaseTransformation) ------------------------------------------------- -- Extract teach profile ------ ------------------------------------------------- -- Preprocess profile to teach on local profilesToAggregate = {} for j = 0, stepsize - 1 do -- stepzie = MM_TO_PROCESS / pixelSizeY profilesToAggregate[#profilesToAggregate + 1] = Image.extractRowProfile(heightMap, j) end local frameProfile = Profile.aggregate(profilesToAggregate, 'MEAN') frameProfile:convertCoordinateType('EXPLICIT_1D') local startProfile = frameProfile:fillInvalidValues('LINEAR') -- Extract region to match local teachStartInd = 180 local teachStopInd = 410 local teachProfile = startProfile:crop(teachStartInd, teachStopInd) ------------------------------------------------- -- Teach profile ------ ------------------------------------------------- local matcher = Profile.Matching.PatternMatcher.create() matcher:teach(teachProfile) ------------------------------------------------- -- Process data and start over three times ------ ------------------------------------------------- for iRepeat = 1, 3 do for i = 0, heightMapH - 1, stepsize do local profilingTime = DateTime.getTimestamp() ------------------------------------------------- -- Aggregate a number of profiles together ------ ------------------------------------------------- profilesToAggregate = {} for j = 0, stepsize - 1 do -- stepzie = MM_TO_PROCESS / pixelSizeY if i + j < heightMapH then profilesToAggregate[#profilesToAggregate + 1] = Image.extractRowProfile(heightMap, i + j) end end frameProfile = Profile.aggregate(profilesToAggregate, 'MEAN') frameProfile:convertCoordinateType('EXPLICIT_1D') ------------------------------------------------- -- Match profiles - ------------------------------------------------- local pos, score = matcher:match(frameProfile) ------------------------------------------------- -- Match OK? - ------------------------------------------------- local validStr local failPassColor = RED local plotProfile = teachProfile:clone() local translation = 0.0 if score > 0.95 then validStr = 'true' failPassColor = GREEN translation = Profile.getCoordinate(frameProfile, pos) - teachProfile:getCoordinate(0) else validStr = 'false' plotProfile:addConstantInplace(-7) -- Plot not ok match below current profile end print('') print('Valid: ' .. validStr) print('Time for processing: ' .. DateTime.getTimestamp() - profilingTime .. 'ms') ------------------------------------------------- -- Plot results - ------------------------------------------------- local gDeco = View.GraphDecoration.create() gDeco:setXBounds(0, 100) gDeco:setYBounds(0, 40) gDeco:setDrawSize(0.8) -- Plot current profile v2D:clear() v2D:addProfile(frameProfile, gDeco) -- Plot teach profile in best match position gDeco:setGraphColor(failPassColor[1], failPassColor[2], failPassColor[3]) gDeco:setBackgroundColor(0, 0, 0, 0) gDeco:setGridColor(0, 0, 0, 0) plotProfile:translateInplace(translation, 0) v2D:addProfile(plotProfile, gDeco) local scannedFrame = scanBox:translate(0, i * pixelSizeY, 0) -- move scan box to the current frame v3D:clear() v3D:addHeightmap(heightMap, deco3D) v3D:addShape(scannedFrame, helper.getDeco(failPassColor, 1, 1, FILL_ALPHA)) v3D:present() v2D:present() print('Time for processing + visualization: ' .. DateTime.getTimestamp() - profilingTime .. 'ms') Script.sleep(DELAY) end end end --The following registration is part of the global scope which runs once after startup --Registration of the 'main' function to the 'Engine.OnStarted' event Script.register('Engine.OnStarted', main) --End of Function and Event Scope--------------------------------------------------
-- // Varables local FunctionLibary = { Name = "NetEvent" } FunctionLibary.__index = FunctionLibary local FunctionObject = { Name = "NetEvent" } FunctionObject.__index = FunctionObject -- // Object Methods function FunctionObject:Bind(Function) self.Function = Function end function FunctionObject:Invoke(...) return FunctionLibary.Infinity.Promise.new(function(Promise, ...) if FunctionLibary.Infinity.IsServer then local Arg1 = select(1, ...) if type(Arg1) ~= "userdata" then return Promise:Reject("Argument #1 Expected Player") end if Arg1.ClassName ~= "Player" then return Promise:Reject("Argument #1 Expected Player") end local Result = { pcall(self.Object.InvokeClient, self.Object, ...) } local Success = table.remove(Result, 1) return (Success and Promise:Resolve(table.unpack(Result))) or Promise:Reject(Result[2]) else local Result = { pcall(self.Object.InvokeServer, self.Object, ...) } local Success = table.remove(Result, 1) return (Success and Promise:Resolve(table.unpack(Result))) or Promise:Reject(Result[2]) end end, ...) end -- // Libary Methods function FunctionLibary.new(EventName, Function) local FunctionObject = setmetatable({ }, FunctionObject) FunctionObject.Function = Function FunctionObject.CallNumber = 0 function FunctionObject.OnInvoke(...) if FunctionObject.Function then return FunctionObject.Function(...) end end if FunctionLibary.Infinity.IsServer then FunctionObject.Object = Instance.new("RemoteFunction") FunctionObject.Object.Name = EventName FunctionObject.Object.Parent = FunctionLibary.Folder FunctionObject.Object.OnServerInvoke = FunctionObject.OnInvoke else FunctionObject.Object = FunctionLibary.Folder:WaitForChild(EventName) FunctionObject.Object.OnClientInvoke = FunctionObject.OnInvoke end return FunctionLibary.Infinity.Proxy:FromTable(FunctionObject) end return function(Infinity) FunctionLibary.Infinity = Infinity if not FunctionLibary.Infinity.IsPlugin then if FunctionLibary.Infinity.IsServer then FunctionLibary.Folder = Instance.new("Folder") FunctionLibary.Folder.Name = "InfinityRemoteFunctions" FunctionLibary.Folder.Parent = game:GetService("ReplicatedStorage") else FunctionLibary.Folder = game:GetService("ReplicatedStorage"):WaitForChild("InfinityRemoteFunctions") end end return setmetatable({ Functions = { } }, FunctionLibary) end
-- Copyright (C) by Kwanhur Huang return require('resty.imagick.wand')
--[[ Threads ]]-- Citizen.CreateThread(function() for k, vendor in ipairs(Config.Vendors) do if not vendor.Items then goto skip end local interactions = {} local embedded = {} for _k, item in ipairs(vendor.Items) do embedded[_k] = { id = ("vendor-%s-%s"):format(k, _k), text = item.Name, items = { { name = "Bills", amount = item.Price } }, event = "vendor", } end for __k, model in ipairs(vendor.Models) do exports.interact:Register({ id = ("vendor-%s"):format(k), embedded = embedded, model = model, }) end ::skip:: end end) --[[ Events ]]-- AddEventHandler("interact:on_vendor", function(interactable) exports.mythic_notify:SendAlert("error", "Empty...", 7000) end)