<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Пользовательские тип данных в hex-окне (пример)]]></title><description><![CDATA[<pre><code>function bytes_to_value_function(b1,b2,b3,b4)
  -- для примера
  local table = {b1, b2, b3, b4}
  local dword = byteTableToDword(table)
  local refDataFromAddress = getAddressSafe(dword)
  if dataPointer ~= nil then
     return refDataFromAddress
  end
  return dword
end

function value_to_bytes_function(integer)
  -- просто для примера
  return bXor(integer, 100)
end
local isFloat = false
registerCustomTypeLua('Pointer 2', 4, bytes_to_value_function, value_to_bytes_function, isFloat)
</code></pre>
<p dir="auto">Справка</p>
<pre><code>CustomType class (Object)
The custom type is an convertor of raw data, to a human readable interpretation.

global functions
  registerCustomTypeLua(typename, bytecount, bytestovaluefunction, valuetobytesfunction, isFloat)
    Registers a Custom type based on lua functions
    The bytes to value function should be defined as "function bytestovalue (b1,b2,b3,b4)" and return an integer as result
    The value to bytes function should be defined as "function valuetobytes (integer)" and return the bytes it should write

    returns the Custom Type object


  registerCustomTypeAutoAssembler(script)
    Registers a custom type based on an auto assembler script. The script must allocate an "ConvertRoutine" and "ConvertBackRoutine"

    returns the Custom Type object

  getCustomType(typename) : Returns the custom type object, or nil if not found

properties
  name: string
  functiontypename: string
  CustomTypeType: TCustomTypeType - The type of the script
  script: string - The custom type script
  scriptUsesFloat: boolean - True if this script interprets it's user side values as float

methods
  byteTableToValue({bytetable},Address Optional)
  valueToByteTable(value, Address Optional)
</code></pre>
]]></description><link>https://celua.ru/topic/104/пользовательские-тип-данных-в-hex-окне-пример</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Mar 2026 03:45:40 GMT</lastBuildDate><atom:link href="https://celua.ru/topic/104.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 14 May 2023 13:09:43 GMT</pubDate><ttl>60</ttl></channel></rss>