1 Commits

Author SHA1 Message Date
d538e7b4e8 Blocks: add 3 models 2025-07-26 21:24:07 +03:00
45 changed files with 2368 additions and 2577 deletions

View File

@@ -69,7 +69,6 @@ img_files = {
{"SETTINGS/SYSTEM.INI", "common/settings/system.ini"},
{"SETTINGS/TASKBAR.INI", "common/settings/taskbar.ini"},
{"SETTINGS/SYSTEM.ENV", "common/settings/system.env"},
{"SETTINGS/USBDRV.DAT",VAR_DRVS .. "/usb/usbother/usbdrv.dat"},
}
-- For russian build, add russian-only files.
@@ -568,7 +567,6 @@ tup.append_table(img_files, {
{"DRIVERS/OHCI.SYS", VAR_DRVS .. "/usb/ohci.sys"},
{"DRIVERS/EHCI.SYS", VAR_DRVS .. "/usb/ehci.sys"},
{"DRIVERS/USBHID.SYS", VAR_DRVS .. "/usb/usbhid/usbhid.sys"},
{"DRIVERS/USBOTHER.SYS",VAR_DRVS .. "/usb/usbother/usbother.sys"},
{"DRIVERS/USBSTOR.SYS", VAR_DRVS .. "/usb/usbstor.sys"},
{"DRIVERS/RDC.SYS", VAR_DRVS .. "/video/rdc.sys"},
{"DRIVERS/COMMOUSE.SYS", VAR_DRVS .. "/mouse/commouse.sys"},

View File

@@ -1,4 +0,0 @@
if tup.getconfig("NO_FASM") ~= "" then return end
ROOT = "../../.."
tup.rule("usbother.asm", "fasm %f %o " .. tup.getconfig("PESTRIP_CMD") .. tup.getconfig("KPACK_CMD"), "%B.sys")
tup.rule("usbdrv.asm", "fasm %f %o ", "%B.dat")

View File

@@ -1,214 +0,0 @@
;*****************************************************************************;
; Copyright (C) 2025, Mikhail Frolov aka Doczom . All rights reserved. ;
; Distributed under terms of the 3-Clause BSD License. ;
;*****************************************************************************;
; File of usb drivers
; base = 0
; offset | Size | Name | Description
;=======================|=======|===============|=============================
; base + 0 | 4 | ID_drv_table | offset to dev_ven drv array
; base + 4 | 4 | Class_table | offset to class drv array
;
; n = 0 .. count driver with ID table
; nt = count driver with ID table
; ID_drv_table + 0*(n-1)| 4 | ID_TABLE | offset from base to table VID:PID
; ID_drv_table + 4*(n-1)| 4 | DRV_NAME | offset from base to name of driver
; ID_drv_table + 8*nt | 8 | __ZERO | terminaror of list
; k = 0 .. count driver on class code
; kt = count driver on class code
; Class_table + 0*(k-1) | 1 | LENGTH_CLASS | length of class code 1..3
; Class_table + 1*(k-1) | 1 | USB_CLASS | main usb class code (M)
; Class_table + 2*(k-1) | 1 | USB_SUBCLASS | USB subclass code or zero(V)
; Class_table + 2*(k-1) | 1 | USB_PROTOCOL | USB protocol code or zero(V)
; Class_table + 4*(k-1) | 4 | DRV_NAME | offset from base to name of driver
; Class_table + 8*kt | 8 | __ZERO | terminaror of list
; i = 0 .. count VID:PID
; it = count VID:PID
; ID_TABLE + 0*(i-1) | 2 | VID | Vendor id
; ID_TABLE + 2*(i-1) | 2 | PID | Product id
; ID_TABLE + 4*it | 4 | __ZERO | terminaror of list
macro INIT_USBDRV_FILE {
local ..id_list, ..class_list
format binary as 'dat'
use32
org 0
dd ..id_list
dd ..class_list
macro ID_DRV_TABLE \{
dd 0, 0
\}
macro CLASS_TABLE \{
dd 0, 0
\}
macro ID_TABLE \{
\}
macro DRV_NAME_LIST \{
\}
postpone \{
..id_list: ID_DRV_TABLE
..class_list: CLASS_TABLE
ID_TABLE
DRV_NAME_LIST
\}
}
macro ADD_CLASS drv_name, class, subclass, protocol {
local ..length, ..class_code, ..drv_name
..length = 3
match =X, class \{
err 'Class is mandatory argument'
\}
match =X, protocol \{
..length = 2
\}
match =X, subclass \{
..length = 1
\}
..class_code = ..length or (class shl 8)
if ..length = 3
..class_code = ..class_code or (protocol shl 24)
end if
if ..length = 2
..class_code = ..class_code or (subclass shl 16)
end if
; add in list
macro DRV_NAME_LIST \{
..drv_name: db drv_name, 0
DRV_NAME_LIST
\}
macro CLASS_TABLE \{
dd ..class_code, ..drv_name
CLASS_TABLE
\}
}
macro ADD_ID drv_name, [device_id] {
common
local ..drv_name, ..id_table
macro ID_TABLE \{
ID_TABLE
..id_table:
\}
reverse
local vid_pid
match VID:PID, device_id \{
vid_pid = (PID shl 16) + VID
\}
macro ID_TABLE \{
ID_TABLE
dd vid_pid
\}
common
macro ID_TABLE \{
ID_TABLE
dd 0
\}
macro DRV_NAME_LIST \{
..drv_name: db drv_name, 0
DRV_NAME_LIST
\}
macro ID_DRV_TABLE \{
dd ..id_table, ..drv_name
ID_DRV_TABLE
\}
}
; ADD ID driver Linux
macro ADD_IDL drv_name, [vendor_id, device_id] {
common
local ..drv_name, ..id_table
macro ID_TABLE \{
ID_TABLE
..id_table:
\}
reverse
local vid_pid
vid_pid = (device_id shl 16) + vendor_id
macro ID_TABLE \{
ID_TABLE
dd vid_pid
\}
common
macro ID_TABLE \{
ID_TABLE
dd 0
\}
macro DRV_NAME_LIST \{
..drv_name: db drv_name, 0
DRV_NAME_LIST
\}
macro ID_DRV_TABLE \{
dd ..id_table, ..drv_name
ID_DRV_TABLE
\}
}
INIT_USBDRV_FILE
;ADD_CLASS 'usbcdc-ctrl' , 0x02, X , X
;ADD_CLASS 'usbimage' , 0x06, 1 , 1
;ADD_CLASS 'usbcdc-data' , 0x0A, X , X
;ADD_CLASS 'ccid' , 0x0B, X , X
;ADD_CLASS 'uvd' , 0x0E, X , X
;ADD_CLASS 'uvd_2' , 0x0E, 0x02, X
;ADD_CLASS 'usb_bluetooth' , 0xE0, 0x01, X
;ADD_CLASS 'usb_wifi' , 0xE0, 0x02, X
ADD_ID 'usbftdi',\
0x0403:0 ; Any FTDI device
;https://github.com/avrdudes/avrdude/blob/main/src/usbdevs.h#L51
;ADD_ID 'usbasp',\
; 0x16c0:0x05dc,\ ; VOTI Obdev's free shared PID
; 0x03e8:0xc7b4,\ ; ATMEL (unofficial) USBasp
; 0x16c0:0x092f ; VOTI NIBObee PID
;https://github.com/WCHSoftGroup/ch341par_linux/blob/main/driver/ch34x_pis.c
;ADD_IDL 'ch341par',\
; 0x1a86, 0x5512,\ ; ch341a default
; 0x1a86, 0x55db,\ ; CH347T Mode1 SPI+IIC+UART
; 0x1a86, 0x55dd,\ ; CH347T Mode3 JTAG+UART
; 0x1a86, 0x55de,\ ; CH347F
; 0x1a86, 0x55e7 ; CH339W
;https://github.com/openbsd/src/blob/master/sys/dev/usb/uchcom.c
;https://github.com/WCHSoftGroup/ch341ser_linux/blob/main/driver/ch341.c
;ADD_IDL 'ch341ser',\
; 0x1a86, 0x7523,\ ; ch340 chip
; 0x1a86, 0x7522,\ ; ch340k chip
; 0x1a86, 0x5523,\ ; ch341 chip
; 0x1a86, 0xe523,\ ; ch330 chip
; 0x4348, 0x5523 ; ch340 custom chip

View File

@@ -1,523 +0,0 @@
;*****************************************************************************;
; Copyright (C) 2025, Mikhail Frolov aka Doczom . All rights reserved. ;
; Distributed under terms of the 3-Clause BSD License. ;
; ;
; usbother is a driver for loading USB drivers of a certain class and vendor. ;
; ;
; Version 0.1.1, 24 May 2025 ;
; ;
;*****************************************************************************;
format PE native 0.05
entry START
; const
DRV_VERSION = 0x0101 ; 0.1.1
; struct
include '../../struct.inc'
; USB device descriptor
struct DEVICE_DESCR
bLength db ?
bDescriptorType db ?
bcdUSB dw ?
bDeviceClass db ?
bDeviceSubClass db ?
bDeviceProtocol db ?
bMaxPacketSize0 db ?
idVendor dw ?
idProduct dw ?
bcdDevice dw ?
iManufacturer db ?
iProduct db ?
iSerialNumber db ?
bNumConfigurations db ?
ends
struct INTERFACE_DESCR
bLength db ?
bDescriptorType db ?
bInterfaceNumber db ?
bAlternateSetting db ?
bNumEndpoints db ?
bInterfaceClass db ?
bInterfaceSubClass db ?
bInterfaceProtocol db ?
iInterface db ?
ends
struct SRV
srv_name rb 16 ;ASCIIZ string
magic dd ? ;+0x10 ;'SRV '
size dd ? ;+0x14 ;size of structure SRV
fd dd ? ;+0x18 ;next SRV descriptor
bk dd ? ;+0x1C ;prev SRV descriptor
base dd ? ;+0x20 ;service base address
entry dd ? ;+0x24 ;service START function
srv_proc dd ? ;+0x28 ;user mode service handler
srv_proc_ex dd ? ;+0x2C ;kernel mode service handler
ends
struct USBSRV
srv SRV
usb_func dd ?
ends
struct USBFUNC
strucsize dd ?
add_device dd ?
device_disconnect dd ?
ends
USBDRV_TYPE_NOLOCK = 0 ; usb device not controlled (native driver
; not found and IOCTL not opened device)
USBDRV_TYPE_NATIVE = 1 ; native PE kernel driver for usb
USBDRV_TYPE_IOCTL = 2 ; usb device is controlled by IOCTL service
; (driver or userspace process/threads)
USBDRV_IOCTL_BLOCKED = 4 ; blocked IOCTL interface, device disconnected
struct DRV_CONTEXT
next dd ?
prev dd ?
drv_hand dd ?
drv_pdata dd ?
flags dd ?
config_descr dd ?
interface_descr dd ?
ep rd 64 ; 32 IN + 32 OUT endpoints' pipes
ends
DRV_CONTEXT.ep0 fix (DRV_CONTEXT.ep + 0)
section '.flat' code readable writable executable
include '../../proc32.inc'
include '../../peimport.inc'
include '../../macros.inc'
proc START c, state:dword, cmdline:dword
cmp [state], DRV_ENTRY
jne .end
; init
mov ecx, drv_list_lock
invoke MutexInit
mov ecx, interface_list_lock
invoke MutexInit
; load drv_list
stdcall load_drv_list, default_list
test eax, eax
jnz .end
; reg driver
invoke RegUSBDriver, drv_name, service_proc, usb_functions
ret
.end:
xor eax, eax
ret
endp
proc load_drv_list stdcall, .path:dword
push ebx
mov ecx, drv_list_lock
invoke MutexLock
; load file
invoke LoadFile, [.path]
test eax, eax
push eax
jnz @f
mov dword[esp], -1
jmp .exit
@@:
cmp [drv_list], 0
jz @f
invoke KernelFree, [drv_list]
@@:
mov eax,[esp]
mov [drv_list], eax
mov dword[esp], 0
.exit:
mov ecx, drv_list_lock
invoke MutexUnlock
pop eax
pop ebx
ret
endp
proc service_proc stdcall, .ioctl:dword
push esi
or eax, -1
mov esi, [.ioctl]
mov ecx, [esi + IOCTL.io_code]
cmp ecx, .count_ioctl_codes
jae .fail
jmp dword[.table_subfunction + ecx*4]
.table_subfunction:
dd .get_version
dd .update_list
dd .get_array_dev
dd .get_full_dev_data
dd .open_dev
dd .close_dev
dd .control_transfer
dd .bulk_transfer
dd .interrupt_transfer
;dd .control_transfer_async
;dd .bulk_transfer_async
;dd .interrupt_transfer_async
.count_ioctl_codes = ($ - .table_subfunction)/4
.get_version:
mov eax, [esi + IOCTL.output]
cmp [esi + IOCTL.out_size], 4
jne .fail
mov dword[eax], DRV_VERSION
xor eax, eax
jmp .exit
.update_list:
; update list
mov ecx, [esi + IOCTL.input]
cmp [esi + IOCTL.inp_size], 0
jnz @f
mov ecx, default_list
@@:
stdcall load_drv_list, ecx
.exit:
pop esi
ret
.get_array_dev:
.get_full_dev_data:
.open_dev:
.close_dev:
;
.control_transfer:
.bulk_transfer:
.interrupt_transfer:
.fail:
or eax, -1
jmp .exit
endp
proc AddDevice stdcall, .config_pipe:dword, \
.config_descr:dword,\
.interface:dword
push esi edi
mov eax, sizeof.DRV_CONTEXT
invoke Kmalloc
test eax, eax
jz .err_init
mov esi, eax
mov ecx, interface_list_lock
invoke MutexLock
mov edx, [usb_interface_list] ; next
mov [esi + DRV_CONTEXT.next], edx
mov [esi + DRV_CONTEXT.prev], usb_interface_list
mov [usb_interface_list], esi
mov [edx + DRV_CONTEXT.prev], esi
mov ecx, interface_list_lock
invoke MutexUnlock
and [esi + DRV_CONTEXT.drv_hand], 0
mov [esi + DRV_CONTEXT.flags], USBDRV_TYPE_NOLOCK
; lock mutex
mov ecx, drv_list_lock
invoke MutexLock
; save device context data
mov eax, [.config_pipe]
mov [esi + DRV_CONTEXT.ep0], eax
mov eax, [.config_descr]
mov [esi + DRV_CONTEXT.config_descr], eax
mov eax, [.interface]
mov [esi + DRV_CONTEXT.interface_descr], eax
; get pointer to list
mov edx, [drv_list]
test edx, edx
jz .err_exit
mov edi, edx
add edi, [edx]
; get in ecx VID:PID code
invoke USBGetParam, [.config_pipe], 0
mov ecx, dword[eax + DEVICE_DESCR.idVendor]
.loop_id_drv:
cmp dword[edi], 0
jz .end_loop_id_drv
mov edx, [drv_list]
add edx, [edi] ; ID_TABLE
.loop_id:
cmp dword[edx], 0
jz .end_loop_id
; check id
mov eax, ecx
test word[edx + 2], 0xffff
jne @f
; driver for all devices of VID
and eax, 0xffff
@@:
cmp [edx], eax ; check VID:PID
je @f
add edx, 4
jmp .loop_id
@@: ; found
call .load_drv
jnz .exit
add edx, 4
jmp .loop_id
.end_loop_id:
add edi, 8
jmp .loop_id_drv
.end_loop_id_drv:
push esi
mov esi, str_1
invoke SysMsgBoardStr
pop esi
; get in ecx class code
mov eax, [.interface]
mov ecx, dword[eax + INTERFACE_DESCR.bInterfaceClass] ; 24-31 bits
mov edi, [drv_list]
add edi, [edi + 4]
.loop_class:
cmp dword[edi], 0
jz .end_loop_class
; check class
movzx eax, byte[edi] ; length
and eax, 11b ; protect - max length = 3
lea eax, [eax*8] ; 1 = 8; 2 = 16; 3 = 24
xor edx, edx
bts edx, eax
dec edx ; bitmask
mov eax, [edi]
shr eax, 8
and eax, edx ; good class in list
and edx, ecx ; good class of device
cmp eax, edx
je @f
add edi, 8
jmp .loop_class
@@: ; found
call .load_drv
jnz .exit
add edi, 8
jmp .loop_class
; IN: edi - item list of driver
; esi - DRV_CONTEXT
; OUT: ZF - not found zF - found
; function save drv handl in DRV_CONTEXT.drv_hand
; and pdata in DRV_CONTEXT.drv_pdata
.load_drv:
push ecx edx
; load driver
push esi
mov esi, str_2
invoke SysMsgBoardStr
pop esi
mov ecx, [drv_list]
add ecx, [edi + 4]
pusha
mov esi, ecx
invoke SysMsgBoardStr
mov esi, str_newline
invoke SysMsgBoardStr
popa
invoke GetService, ecx
test eax, eax
jz @f
mov [esi + DRV_CONTEXT.drv_hand], eax
; get function list
mov ecx, [eax + USBSRV.usb_func]
; call AddDevice of driver
stdcall [ecx + USBFUNC.add_device], [.config_pipe], \
[.config_descr],\
[.interface]
mov [esi + DRV_CONTEXT.drv_pdata], eax
test eax, eax
jnz .load_drv.good
push esi
mov esi, str_4
invoke SysMsgBoardStr
pop esi
and [esi + DRV_CONTEXT.drv_hand], 0
@@:
pushf
push esi
mov esi, str_5
invoke SysMsgBoardStr
pop esi
popf
pop edx ecx
retn
.load_drv.good:
pushf
push esi
mov esi, str_3
invoke SysMsgBoardStr
pop esi
popf
mov [esi + DRV_CONTEXT.flags], USBDRV_TYPE_NATIVE
pop edx ecx
retn
.err_exit:
mov eax, esi
invoke Kfree
xor esi, esi
.end_loop_class:
.exit:
; driver not found - Added libusb driver
; unlock mutex
mov ecx, drv_list_lock
invoke MutexUnlock
mov eax, esi
pop edi esi
ret
.err_init:
xor eax, eax
pop edi esi
ret
endp
proc DeviceDisconnected stdcall, .pdata:dword
mov eax, [.pdata]
test [eax + DRV_CONTEXT.flags], USBDRV_TYPE_NATIVE
jz .no_native
cmp [eax + DRV_CONTEXT.drv_hand], 0
jz .free
; call device disconnected
mov ecx, [eax + DRV_CONTEXT.drv_hand]
mov edx, [ecx + USBSRV.usb_func]
cmp dword[edx], USBFUNC.device_disconnect
jbe .free ; TODO: check
stdcall [edx + USBFUNC.device_disconnect], [eax + DRV_CONTEXT.drv_pdata]
.free:
; clear list of DRV_CONTENT
mov ecx, interface_list_lock
invoke MutexLock
mov eax, [.pdata]
mov edx, [eax + DRV_CONTEXT.prev]
mov ecx, [eax + DRV_CONTEXT.next]
mov [edx + DRV_CONTEXT.next], ecx
mov [ecx + DRV_CONTEXT.prev], edx
mov ecx, interface_list_lock
invoke MutexUnlock
; free context
mov eax, [.pdata]
invoke Kfree
ret
.no_native:
test [eax + DRV_CONTEXT.flags], USBDRV_TYPE_IOCTL
jz .free
; set state for block user api and clear struct
or [eax + DRV_CONTEXT.flags], USBDRV_IOCTL_BLOCKED
xor ecx, ecx
;mov [eax + DRV_CONTEXT.drv_hand], ecx
;mov [eax + DRV_CONTEXT.drv_pdata], ecx
mov [eax + DRV_CONTEXT.config_descr], ecx
mov [eax + DRV_CONTEXT.interface_descr], ecx
mov [eax + DRV_CONTEXT.ep0], ecx
; TODO
jmp .free
endp
; data
drv_list_lock MUTEX
drv_list dd ?
interface_list_lock MUTEX
usb_interface_list:
dd usb_interface_list
dd usb_interface_list
usb_functions:
dd .end - usb_functions
dd AddDevice
dd DeviceDisconnected
.end:
drv_name db 'usbother', 0
default_list: db '/sys/settings/usbdrv.dat', 0
str_1: db 'USBOTHER: Driver for this ID not found', 13, 10, 0
str_2: db 'USBOTHER: Check found driver: ', 0, 13, 10, 0
str_3: db 'USBOTHER: Device driver is good', 13, 10, 0
str_4: db 'USBOTHER: Device driver fail prob', 13, 10, 0
str_5: db 'USBOTHER: Device driver load error', 13, 10, 0
str_newline: db 13,10,0
data fixups
end data

View File

@@ -60412,6 +60412,67 @@ dd -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0
@@:
db 'r1x3x1',0
align 4
dd (@f-$)/24 ;points
dd -1.95, -1.95, 0.0, -1.95, 9.95, 3.0, -1.95, 9.95,\
0.0, -1.95, 9.95, 3.0, -1.95, -1.95, 0.0, -1.95, -1.95,\
3.0, -1.95, 9.95, 3.0, 1.95, -1.95, 3.0, 1.95, 9.95,\
3.0, 1.95, -1.95, 3.0, -1.95, 9.95, 3.0, -1.95, -1.95,\
3.0, 1.95, -1.95, 3.0, 1.95, 9.95, 0.0, 1.95, 9.95,\
3.0, 1.95, 9.95, 0.0, 1.95, -1.95, 3.0, 1.95, -1.95,\
0.0, 1.95, -1.95, 0.0, 1.25, -1.25, 0.0, 1.95, 9.95,\
0.0, 1.95, -1.95, 0.0, -1.25, -1.25, 0.0, 1.25, -1.25,\
0.0, -1.25, -1.25, 0.0, -1.95, -1.95, 0.0, -1.25, 9.25,\
0.0, -1.95, -1.95, 0.0, -1.25, -1.25, 0.0, 1.95, -1.95,\
0.0, 1.25, 9.25, 0.0, 1.95, 9.95, 0.0, 1.25, -1.25,\
0.0, -1.25, 9.25, 0.0, 1.95, 9.95, 0.0, 1.25, 9.25,\
0.0, -1.25, 9.25, 0.0, -1.95, 9.95, 0.0, 1.95, 9.95,\
0.0, -1.95, 9.95, 0.0, -1.25, 9.25, 0.0, -1.95, -1.95,\
0.0, -1.95, -1.95, 0.0, 1.95, -1.95, 3.0, -1.95, -1.95,\
3.0, 1.95, -1.95, 3.0, -1.95, -1.95, 0.0, 1.95, -1.95,\
0.0, 1.95, 9.95, 0.0, -1.95, 9.95, 3.0, 1.95, 9.95,\
3.0, -1.95, 9.95, 3.0, 1.95, 9.95, 0.0, -1.95, 9.95,\
0.0, -1.25, -1.25, 1.999, -1.25, 9.25, 0.0, -1.25, 9.25,\
1.999, -1.25, 9.25, 0.0, -1.25, -1.25, 1.999, -1.25, -1.25,\
0.0, -1.25, -1.25, 1.999, 1.25, 9.25, 1.999, 1.25, -1.25,\
1.999, 1.25, 9.25, 1.999, -1.25, -1.25, 1.999, -1.25, 9.25,\
1.999, 1.25, -1.25, 0.0, 1.25, 9.25, 1.999, 1.25, 9.25,\
0.0, 1.25, 9.25, 1.999, 1.25, -1.25, 0.0, 1.25, -1.25,\
1.999, -1.25, 9.25, 0.0, 1.25, 9.25, 1.999, -1.25, 9.25,\
1.999, 1.25, 9.25, 1.999, -1.25, 9.25, 0.0, 1.25, 9.25,\
0.0, 1.25, -1.25, 0.0, -1.25, -1.25, 1.999, 1.25, -1.25,\
1.999, -1.25, -1.25, 1.999, 1.25, -1.25, 0.0, -1.25, -1.25,\
0.0
dd -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,\
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,\
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,\
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,\
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0
@@:
db 'f1x2x1',0
align 4
dd (@f-$)/24 ;points
@@ -65876,6 +65937,76 @@ dd 0.32144, -0.94693, 0.0, 0.13052, -0.99145, 0.0, 0.44229, -0.89687, 0.0,\
-0.7071, -0.70711, 0.0, -0.38269, -0.92388, 0.0, -0.70711, -0.70711, 0.0,\
-0.38268, -0.92388, 0.0, -0.70711, -0.70711, 0.0, -0.38268, -0.92388, 0.0
@@:
db 'a1x1x2',0
align 4
dd (@f-$)/24 ;points
dd -1.95, -1.95, 0.0, -1.95, 1.95, 3.0, -1.95, 1.95,\
0.0, -1.95, 1.95, 3.0, -1.95, -1.95, 0.0, -1.95, -1.94994,\
6.0, -1.95, -1.94994, 6.0, -1.95, -1.95, 0.0, -1.95, -1.95,\
6.0, -1.95, -1.94994, 6.0, 1.95, -1.95, 6.0, 1.95, -1.94994,\
6.0, 1.95, -1.95, 6.0, -1.95, -1.94994, 6.0, -1.95, -1.95,\
6.0, 1.95, -1.95, 0.0, 1.95, 1.95, 3.0, 1.95, -1.94994,\
6.0, 1.95, -1.95, 0.0, 1.95, -1.94994, 6.0, 1.95, -1.95,\
6.0, 1.95, 1.95, 3.0, 1.95, -1.95, 0.0, 1.95, 1.95,\
0.0, -1.95, -1.95, 0.0, 1.95, -1.95, 6.0, -1.95, -1.95,\
6.0, 1.95, -1.95, 6.0, -1.95, -1.95, 0.0, 1.95, -1.95,\
0.0, 1.95, 1.95, 0.0, -1.95, 1.95, 3.0, 1.95, 1.95,\
3.0, -1.95, 1.95, 3.0, 1.95, 1.95, 0.0, -1.95, 1.95,\
0.0, -1.95, 1.95, 3.0, 1.95, -1.94994, 6.0, 1.95, 1.95,\
3.0, 1.95, -1.94994, 6.0, -1.95, 1.95, 3.0, -1.95, -1.94994,\
6.0, 1.95, -1.95, 0.0, 1.25, -1.25, 0.0, 1.95, 1.95,\
0.0, 1.95, -1.95, 0.0, -1.25, -1.25, 0.0, 1.25, -1.25,\
0.0, -1.25, -1.25, 0.0, -1.95, -1.95, 0.0, -1.25, 1.25,\
0.0, -1.95, -1.95, 0.0, -1.25, -1.25, 0.0, 1.95, -1.95,\
0.0, 1.25, 1.25, 0.0, 1.95, 1.95, 0.0, 1.25, -1.25,\
0.0, -1.25, 1.25, 0.0, 1.95, 1.95, 0.0, 1.25, 1.25,\
0.0, -1.25, 1.25, 0.0, -1.95, 1.95, 0.0, 1.95, 1.95,\
0.0, -1.95, 1.95, 0.0, -1.25, 1.25, 0.0, -1.95, -1.95,\
0.0, -1.25, -1.25, 1.999, -1.25, 1.25, 0.0, -1.25, 1.25,\
1.999, -1.25, 1.25, 0.0, -1.25, -1.25, 1.999, -1.25, -1.25,\
0.0, -1.25, -1.25, 1.999, 1.25, 1.25, 1.999, 1.25, -1.25,\
1.999, 1.25, 1.25, 1.999, -1.25, -1.25, 1.999, -1.25, 1.25,\
1.999, 1.25, -1.25, 0.0, 1.25, 1.25, 1.999, 1.25, 1.25,\
0.0, 1.25, 1.25, 1.999, 1.25, -1.25, 0.0, 1.25, -1.25,\
1.999, -1.25, 1.25, 0.0, 1.25, 1.25, 1.999, -1.25, 1.25,\
1.999, 1.25, 1.25, 1.999, -1.25, 1.25, 0.0, 1.25, 1.25,\
0.0, 1.25, -1.25, 0.0, -1.25, -1.25, 1.999, 1.25, -1.25,\
1.999, -1.25, -1.25, 1.999, 1.25, -1.25, 0.0, -1.25, -1.25,\
0.0
dd -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,\
1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,\
1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,\
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,\
0.0, 0.0, 0.60972, 0.79262, 0.0, 0.60972, 0.79262, 0.0, 0.60972,\
0.79262, 0.0, 0.60972, 0.79262, 0.0, 0.60972, 0.79262, 0.0, 0.60972,\
0.79262, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0,\
0.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0,\
-1.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0,\
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,\
0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0,\
0.0
@@:
db 'a1x2x2',0
align 4
dd (@f-$)/24 ;points

View File

@@ -0,0 +1,170 @@
// block name, color, step, coord: x,y,z, rotation: x,y,z
const m1=6740181;
const m2=6650840;
const m3=16777215;
const m4=16757993;
const m5=8454144;
model_list=[
['b1x6x1', m1, 0, 0, -4, 0, 0,0,90],
['b2x6x1', m1, 0, 0, 0, 0, 0,0,90],
['b2x6x1', m1, 0, 0,-12, 0, 0,0,90],
['b2x4x1', m1, 0, 16, 0, 0, 0,0,90],
['b2x4x1', m1, 0, 16,-12, 0, 0,0,90],
['b1x4x1', m1, 0, 16, -4, 0, 0,0,90],
['u1x2x1', m1, 0,-24, -4, 0, 0,0,90],
['u1x2x1', m1, 0,-24, 0, 0, 0,0,90],
['u1x2x1', m1, 0,-24, -8, 0, 0,0,90],
['b2x3x1', m1, 0, 20, -8, 0, 0,0,0],
['t2x3x1', m1, 0, 28, -4, 0, 0,0,0],
['b1x3x1', m2, 0, -8,-16, 0, 0,0,90],
['b1x3x1', m2, 0, -8, 8, 0, 0,0,90],
['b1x3x1', m2, 0, 16, 8, 0, 0,0,90],
['b1x3x1', m2, 0, 16,-16, 0, 0,0,90],
['b1x3x1', m2, 0, 36, -8, 0, 0,0,0],
['b1x2x1', m2, 0, -8, 12, 0, 0,0,90],
['b1x2x1', m2, 0, -8,-20, 0, 0,0,90],
['b1x2x1', m2, 0, 20, 12, 0, 0,0,90],
['b1x2x1', m2, 0, 20,-20, 0, 0,0,90],
['b1x2x1', m2, 0, 16,-24, 0, 0,0,90],
['b1x2x1', m2, 0, 16, 16, 0, 0,0,90],
['b1x2x1', m2, 0,-12, 16, 0, 0,0,90],
['b1x2x1', m2, 0,-12,-24, 0, 0,0,90],
['t2x3x1', m2, 0, 40, -4, 0, 0,0,0],
['a1x2x2', m3, 0,-16,-20, 0, 0,0,90],
['a1x2x2', m3, 0,-16, 12, 0, 0,0,90],
['a1x2x2', m3, 0, 12, 12, 0, 0,0,90],
['a1x2x2', m3, 0, 12,-20, 0, 0,0,90],
['u1x2x2', m1, 1,-28, 0, 3, 0,0,90],
['u1x2x2', m1, 1,-28, -4, 3, 0,0,90],
['u1x2x2', m1, 1,-28, -8, 3, 0,0,90],
['b2x3x1', m1, 1,-24, -8, 3, 0,0,0],
['l2x2x1', m1, 1,-16, 4, 3, 0,0,180],
['l2x2x1', m1, 1,-16,-12, 3, 0,0,90],
['b2x3x1', m1, 1,-12, -8, 3, 0,0,0],
['t2x3x1', m1, 1, -8, 4, 3, 0,0,90],
['t2x3x1', m1, 1,-12, 12, 3, 0,0,180],
['t2x3x1', m1, 1,-12,-20, 3, 0,0,180],
['t2x3x1', m1, 1, -8,-12, 3, 0,0,-90],
['b2x3x1', m1, 1, 0, -8, 3, 0,0,0],
['b2x3x1', m1, 1, 8, -8, 3, 0,0,0],
['b1x2x1', m1, 1, 4, 4, 3, 0,0,90],
['b1x2x1', m1, 1, 4,-12, 3, 0,0,90],
['b1x2x1', m1, 1, 8,-16, 3, 0,0,0],
['b1x2x1', m1, 1, 8, 4, 3, 0,0,0],
['b1x4x1', m1, 1, 12, 4, 3, 0,0,0],
['b1x4x1', m1, 1, 12,-24, 3, 0,0,0],
['b1x2x1', m1, 1, 20, 0, 3, 0,0,90],
['b1x2x1', m1, 1, 20, -8, 3, 0,0,90],
['b1x4x1', m2, 1, 28, -4, 3, 0,0,90],
['b1x3x1', m1, 1, 40, -4, 3, 0,0,90],
['b2x3x1', m1, 2,-28, -8, 6, 0,0,0],
['t2x3x1', m1, 2,-20, -4, 6, 0,0,0],
['b2x3x1', m1, 2, -8, 0, 6, 0,0,90],
['b2x3x1', m1, 2, -8,-12, 6, 0,0,90],
['b2x3x1', m1, 2, 4,-16, 6, 0,0,90],
['b2x3x1', m1, 2, 4, 4, 6, 0,0,90],
['l2x2x1', m1, 2, 8, 0, 6, 0,0,90],
['l2x2x1', m1, 2, 8, -8, 6, 0,0,180],
['t2x3x1', m1, 2, 12, -4, 6, 0,0,0],
['u1x2x2', m1, 3,-32, -4, 9, 0,0,90],
['u1x2x2', m1, 3,-32, -8, 9, 0,0,90],
['u1x2x2', m1, 3,-32, 0, 9, 0,0,90],
['a1x2x3', m1, 3,-28, 0, 9, 0,0,-90],
['a1x2x3', m1, 3,-28, -8, 9, 0,0,-90],
['b1x3x1', m1, 3,-20, -4, 9, 0,0,90],
['b2x3x1', m1, 3,-16, -8, 9, 0,0,0],
['b2x3x1', m1, 3, -8, -8, 9, 0,0,0],
['b2x3x1', m1, 3, 0, 4, 9, 0,0,90],
['b2x3x1', m1, 3, 0,-16, 9, 0,0,90],
['b1x1x1', m1, 3,-12, 4, 9, 0,0,0],
['b1x1x1', m1, 3,-12,-12, 9, 0,0,0],
['l2x2x1', m1, 3, 4, 0, 9, 0,0,90],
['t2x3x1', m1, 3, 8, -4, 9, 0,0,0],
['t2x3x1', m1, 3, 4, -8, 9, 0,0,-180],
['b2x3x1', m1, 4,-32, -8, 12, 0,0,0],
['b1x1x1', m1, 4,-24, -4, 12, 0,0,0],
['b2x3x1', m1, 4,-12, -8, 12, 0,0,0],
['b1x1x1', m1, 4,-12, 4, 12, 0,0,0],
['b1x2x1', m1, 4, -4, 0, 12, 0,0,0],
['b1x3x1', m1, 4, -4,-12, 12, 0,0,0],
['b1x3x1', m1, 4, 4, -8, 12, 0,0,0],
['b1x4x1', m2, 4, 0,-12, 12, 0,0,0],
['b1x1x1', m2, 4, 8, -4, 12, 0,0,0],
['b1x1x1', m2, 4, 0, 4, 12, 0,0,0],
['b1x1x1', m2, 4, -8, 4, 12, 0,0,0],
['b1x1x1', m2, 4,-16, -4, 12, 0,0,0],
['b1x1x1', m2, 4, -8,-12, 12, 0,0,0],
['b2x3x1', m1, 5,-36, -8, 15, 0,0,0],
['t2x3x1', m1, 5,-28, -4, 15, 0,0,0],
['b1x3x1', m1, 5, -4, -8, 15, 0,0,0],
['b1x1x1', m2, 5, 0, -4, 15, 0,0,0],
['b1x3x1', m2, 5, -8, -8, 15, 0,0,0],
['b2x3x1', m1, 6,-36, -8, 18, 0,0,0],
['t2x3x1', m1, 6,-28, -4, 18, 0,0,0],
['l2x2x1', m1, 7,-36, -8, 21, 0,0,-90],
['l2x2x1', m1, 7,-36, 0, 21, 0,0,0],
['b1x4x1', m1, 7,-36, -4, 21, 0,0,-90],
['u1x2x1', m1, 7,-28, 0, 21, 0,0,-90],
['u1x2x1', m1, 7,-28, -8, 21, 0,0,-90],
['b2x3x1', m1, 8,-48, -8, 24, 0,0,0],
['b2x3x1', m1, 8,-40, -8, 24, 0,0,0],
['u1x2x1', m4, 8,-40, -8, 21, 0,0,90],
['u1x2x1', m4, 8,-40, -4, 21, 0,0,90],
['u1x2x1', m4, 8,-40, 0, 21, 0,0,90],
['b2x3x1', m1, 8,-32,-12, 24, 0,0,0],
['b2x2x1', m1, 8,-32, 0, 24, 0,0,0],
['b1x3x1', m1, 8,-36, 4, 24, 0,0,90],
['b1x3x1', m1, 8,-36,-12, 24, 0,0,90],
['b1x1x1', m1, 8,-24, 0, 24, 0,0,0],
['b1x1x1', m1, 8,-24, -8, 24, 0,0,0],
['b1x1x1', m2, 8,-24, -4, 24, 0,0,0],
['u1x2x1', m1, 8,-32, 4, 21, 0,0,-90],
['u1x2x1', m1, 8,-32,-12, 21, 0,0,-90],
['b1x2x1', m2, 9,-24, -4, 27, 0,0,90],
['a1x1x2', m2, 9,-48, 0, 27, 0,0,90],
['a1x1x2', m2, 9,-48, -8, 27, 0,0,90],
['a1x1x2', m1, 9,-48, -4, 27, 0,0,90],
['b2x3x1', m1, 9,-44,-12, 27, 0,0,0],
['b2x3x1', m1, 9,-36, -8, 27, 0,0,0],
['b2x2x1', m1, 9,-44, 0, 27, 0,0,0],
['a1x2x3', m1, 9,-28, 0, 27, 0,0,-90],
['a1x2x3', m1, 9,-28, -8, 27, 0,0,-90],
['b1x1x1', m1, 9,-28,-12, 27, 0,0,0],
['b1x1x1', m1, 9,-28, 4, 27, 0,0,0],
['b1x1x1', m4, 9,-32,-12, 27, 0,0,90],
['b1x1x1', m4, 9,-32, 4, 27, 0,0,90],
['b1x1x1', m5, 9,-36,-12, 27, 0,0,90],
['b1x1x1', m5, 9,-36, 4, 27, 0,0,90],
['b1x1x1', m5, 10,-36, 4, 30, 0,0,90],
['b1x1x1', m5, 10,-36,-12, 30, 0,0,90],
['a1x2x3', m2, 10,-28, -4, 30, 0,0,-90],
['b2x3x1', m1, 10,-44, -8, 30, 0,0,0],
['b1x1x1', m1, 10,-40, 4, 30, 0,0,0],
['b1x1x1', m1, 10,-40,-12, 30, 0,0,0],
['l2x2x1', m1, 10,-32, -8, 30, 0,0,-90],
['l2x2x1', m1, 10,-32, 0, 30, 0,0,0],
['a1x1x2', m1, 10,-44, 4, 30, 0,0,90],
['a1x1x2', m1, 10,-44,-12, 30, 0,0,90],
['a1x1x2', m1, 10,-28,-12, 30, 0,0,-90],
['a1x1x2', m1, 10,-28, 4, 30, 0,0,-90],
['t2x3x1', m1, 11,-40, -4, 33, 0,0,-180],
['t2x3x1', m2, 11,-32, -4, 33, 0,0,0],
['a1x1x2', m1, 11,-40, 4, 33, 0,0,0],
['a1x1x2', m1, 11,-36, 4, 33, 0,0,0],
['a1x1x2', m1, 11,-32, 4, 33, 0,0,0],
['a1x1x2', m1, 11,-28, 0, 33, 0,0,-90],
['a1x1x2', m1, 11,-28, -8, 33, 0,0,-90],
['a1x1x2', m1, 11,-32,-12, 33, 0,0,-180],
['a1x1x2', m1, 11,-36,-12, 33, 0,0,-180],
['a1x1x2', m1, 11,-40,-12, 33, 0,0,-180],
['a1x1x2', m1, 11,-44, -8, 33, 0,0,90],
['a1x1x2', m1, 11,-44, 0, 33, 0,0,90],
['a1x1x2', m2, 12,-44, -4, 36, 0,0,90],
['a1x1x2', m2, 12,-28, -4, 36, 0,0,-90],
['b1x3x1', m1, 12,-32, -4, 36, 0,0,90],
['r1x3x1', m1, 12,-32, 0, 36, 0,0,90],
['r1x3x1', m1, 12,-32, -8, 36, 0,0,90],
['r1x3x1', m2, 13,-32, -4, 39, 0,0,90],
];

View File

@@ -0,0 +1,200 @@
// block name, color, step, coord: x,y,z, rotation: x,y,z
const m1=0x008000;
const m2=0xffffff;
const m3=0xfff5be;
const m4=0x005100;
const m5=0xff0000;
const m6=0x510000;
const m7=0xffaaaa;
model_list=[
['b2x3x1', m1, 0, 32, -4, 9, 0,0,0],
['b1x1x1', m2, 0,-16, 4, 9, 0,0,0],
['b1x1x1', m2, 0,-16, -4, 9, 0,0,0],
['b1x1x1', m2, 0,-16, 12, 9, 0,0,0],
['b1x1x1', m2, 0,-16,-12, 9, 0,0,0],
['b1x3x1', m3, 0, 0, -4, 9, 0,0,0],
['b1x4x1', m3, 0, 16, 0, 9, 0,0,90],
['b1x3x1', m3, 0, 28, 0, 9, 0,0,90],
['b1x3x1', m1, 0, 40, -4, 9, 0,0,0],
['b1x1x1', m3, 0, 44, 0, 9, 0,0,0],
['b2x6x1', m3, 0, 24, 4, 9, 0,0,90],
['b2x6x1', m3, 0, 24, -8, 9, 0,0,90],
['l2x2x1', m1, 0, 16, 12, 9, 0,0,0],
['l2x2x1', m1, 0, 12, 12, 9, 0,0,90],
['l2x2x1', m1, 0, 12,-12, 9, 0,0,180],
['l2x2x1', m1, 0, 16,-12, 9, 0,0,-90],
['b2x3x1', m1, 1,-16, 4, 12, 0,0,0],
['b2x3x1', m1, 1,-16,-12, 12, 0,0,0],
['b1x4x1', m3, 1, 4, 4, 12, 0,0,90],
['b1x2x1', m3, 1, 12, 4, 12, 0,0,90],
['b2x6x1', m3, 1, 12, -4, 12, 0,0,90],
['b2x3x1', m1, 1, 16, -4, 12, 0,0,0],
['b2x2x1', m1, 1, 12, 8, 12, 0,0,0],
['b2x2x1', m1, 1, 12,-12, 12, 0,0,0],
['b1x2x1', m1, 1, 8, -8, 12, 0,0,90],
['b1x2x1', m1, 1, 24, -8, 12, 0,0,90],
['b1x2x1', m1, 1, 24, 8, 12, 0,0,90],
['b1x2x1', m1, 1, 8, 8, 12, 0,0,90],
['b1x3x1', m1, 1, 32, 4, 12, 0,0,90],
['b1x3x1', m1, 1, 32, -4, 12, 0,0,90],
['b1x6x1', m1, 1, 44, 0, 12, 0,0,90],
['b1x2x1', m1, 1, 44, 4, 12, 0,0,90],
['b1x2x1', m1, 1, 44, -4, 12, 0,0,90],
['b2x3x1', m1, 2, -4, 8, 15, 0,0,90],
['b2x3x1', m1, 2, -4,-12, 15, 0,0,90],
['b2x3x1', m1, 2, 8, -8, 15, 0,0,90],
['b2x3x1', m1, 2, 8, 4, 15, 0,0,90],
['b2x3x1', m1, 2, 12, -8, 15, 0,0,0],
['b2x3x1', m1, 2, 20, -8, 15, 0,0,0],
['b2x2x1', m1, 2, 12, 4, 15, 0,0,0],
['b2x2x1', m1, 2, 20, 4, 15, 0,0,0],
['t2x3x1', m1, 2, 28, 0, 15, 0,0,0],
['b2x3x1', m3, 2,-12, -4, 15, 0,0,0],
['b1x1x1', m4, 2, 36, 0, 15, 0,0,0],
['b1x3x1', m5, 2, 44, 0, 15, 0,0,-90],
['b1x2x1', m5, 2, 44, 4, 15, 0,0,-90],
['b1x2x1', m5, 2, 44, -4, 15, 0,0,-90],
['b1x1x1', m5, 2, 48, 0, 12, 0,0,0],
['b2x3x1', m3, 3,-16, -4, 18, 0,0,0],
['b1x1x1', m5, 3, 48, 0, 18, 0,0,0],
['b1x1x1', m4, 3, 28, 0, 18, 0,0,0],
['b1x3x1', m1, 3, -8, 4, 18, 0,0,0],
['b1x3x1', m1, 3, -8,-12, 18, 0,0,0],
['l2x2x1', m1, 3, -4, 8, 18, 0,0,0],
['l2x2x1', m1, 3, -4, -8, 18, 0,0,-90],
['b2x3x1', m1, 3, 12, 4, 18, 0,0,90],
['b2x3x1', m1, 3, 12, -8, 18, 0,0,90],
['b2x2x1', m1, 3, 16, 4, 18, 0,0,0],
['b2x2x1', m1, 3, 16, -8, 18, 0,0,0],
['b1x3x1', m1, 3, 24, -4, 18, 0,0,0],
['a1x1x2', m1, 3, 32, 0, 18, 0,0,90],
['b1x6x1', m1, 4, -8, 0, 21, 0,0,90],
['b1x6x1', m1, 4, -8, 4, 21, 0,0,90],
['b1x6x1', m1, 4, -8, -4, 21, 0,0,90],
['b1x6x1', m1, 4, -4, 8, 21, 0,0,90],
['b1x6x1', m1, 4, -4, -8, 21, 0,0,90],
['b1x2x1', m1, 4, 4, -8, 21, 0,0,90],
['b1x2x1', m1, 4, 4, 8, 21, 0,0,90],
['b2x3x1', m1, 4, 16, 4, 21, 0,0,90],
['b2x3x1', m1, 4, 16, -8, 21, 0,0,90],
['t2x3x1', m1, 4, 20, 0, 21, 0,0,0],
['b1x1x1', m4, 4, 28, 0, 21, 0,0,0],
['b2x3x1', m5, 5,-20, -4, 24, 0,0,0],
['b1x3x1', m5, 5,-12, -4, 24, 0,0,0],
['b1x1x1', m2, 5,-24, 0, 24, 0,0,0],
['c1x1x1', m2, 5,-16, 8, 24, 0,0,0],
['c1x1x1', m2, 5,-24, 8, 24, 0,0,0],
['c1x1x1', m2, 5,-24, -8, 24, 0,0,0],
['c1x1x1', m2, 5,-16, -8, 24, 0,0,0],
['b2x3x1', m1, 5, -8, 0, 24, 0,0,0],
['b2x3x1', m1, 5, 8, 4, 24, 0,0,90],
['b2x3x1', m1, 5, 4, -8, 24, 0,0,0],
['b2x3x1', m1, 5, 0, -8, 24, 0,0,90],
['b2x3x1', m1, 5, 12, -4, 24, 0,0,0],
['b1x1x1', m4, 5, 20, 0, 24, 0,0,0],
['b1x1x1', m1, 5, 24, 0, 24, 0,0,0],
['a1x1x2', m4, 5, 28, 0, 24, 0,0,90],
['b2x3x1', m5, 6,-28, -4, 27, 0,0,0],
['b2x3x1', m5, 6,-20, -4, 27, 0,0,0],
['b2x3x1', m5, 6,-12, -4, 27, 0,0,0],
['b2x3x1', m1, 6, -4, -8, 27, 0,0,0],
['b2x2x1', m1, 6, -4, 4, 27, 0,0,0],
['b1x6x1', m1, 6, -8, 8, 27, 0,0,90],
['b1x6x1', m1, 6, -8, -8, 27, 0,0,90],
['t2x3x1', m1, 6, 4, 0, 27, 0,0,0],
['b1x1x1', m4, 6, 12, 0, 27, 0,0,90],
['b1x1x1', m1, 6, 16, 0, 27, 0,0,0],
['b1x1x1', m4, 6, 20, 0, 27, 0,0,90],
['a1x1x2', m1, 6, 24, 0, 27, 0,0,90],
['b1x3x1', m1, 6,-32, -4, 27, 0,0,0],
['a1x2x2', m1, 7,-28, 4, 30, 0,0,90],
['a1x2x2', m1, 7,-28, 0, 30, 0,0,90],
['a1x2x2', m1, 7,-28, -4, 30, 0,0,90],
['b2x3x1', m1, 7,-24, -4, 30, 0,0,0],
['a1x3x2', m1, 7,-20, 8, 30, 0,0,90],
['a1x3x2', m1, 7,-20, -8, 30, 0,0,90],
['l2x2x1', m1, 7,-16, 4, 30, 0,0,0],
['l2x2x1', m1, 7,-16, -4, 30, 0,0,-90],
['b1x1x1', m6, 7,-12, -8, 30, 0,0,0],
['b1x1x1', m6, 7,-12, 8, 30, 0,0,0],
['b1x2x1', m7, 7, -8, -8, 30, 0,0,0],
['b1x2x1', m7, 7, -8, 4, 30, 0,0,0],
['b1x1x1', m1, 7, -4, 8, 30, 0,0,0],
['b1x1x1', m1, 7, -4, -8, 30, 0,0,0],
['a1x2x3', m1, 7, -4, 4, 30, 0,0,-90],
['a1x2x3', m1, 7, -4, -4, 30, 0,0,-90],
['b1x3x1', m1, 7, 0, 0, 30, 0,0,90],
['a1x1x2', m4, 7, 4, 0, 30, 0,0,90],
['b1x1x1', m1, 7, 8, 0, 30, 0,0,0],
['b1x1x1', m4, 7, 12, 0, 30, 0,0,0],
['b1x1x1', m1, 7, 16, 0, 30, 0,0,0],
['a1x1x2', m4, 7, 20, 0, 30, 0,0,90],
['r1x1x1', m1, 8,-28, 0, 33, 0,0,0],
['a1x3x2', m1, 8,-20, 4, 33, 0,0,90],
['a1x3x2', m1, 8,-20, -4, 33, 0,0,90],
['a1x2x2', m1, 8,-16, -8, 33, 0,0,90],
['a1x2x2', m1, 8,-16, 8, 33, 0,0,90],
['a1x2x2', m1, 8, -4, 4, 33, 0,0,0],
['a1x2x2', m1, 8, -4, -4, 33, 0,0,180],
['l2x2x1', m1, 8, -8, -4, 33, 0,0,180],
['l2x2x1', m1, 8, -8, 4, 33, 0,0,90],
['b1x2x1', m1, 8,-20, 0, 33, 0,0,90],
['b1x3x1', m1, 8,-16, -4, 33, 0,0,0],
['a1x2x3', m1, 8, -4, 0, 33, 0,0,-90],
['b1x1x1', m6, 8,-12, 8, 33, 0,0,0],
['b1x1x1', m6, 8,-12, -8, 33, 0,0,0],
['a1x1x2', m1, 8, 8, 0, 33, 0,0,90],
['a1x1x2', m4, 8, 12, 0, 33, 0,0,-90],
['a1x1x2', m1, 8, 16, 0, 33, 0,0,90],
['a1x1x2', m1, 9,-16, -8, 36, 0,0,180],
['a1x1x2', m1, 9,-12, -8, 36, 0,0,180],
['a1x1x2', m1, 9, -8, -8, 36, 0,0,180],
['a1x1x2', m1, 9,-16, 8, 36, 0,0,0],
['a1x1x2', m1, 9,-12, 8, 36, 0,0,0],
['a1x1x2', m1, 9, -8, 8, 36, 0,0,0],
['a1x1x2', m1, 9, -4, 4, 36, 0,0,-90],
['a1x1x2', m1, 9, -4, -4, 36, 0,0,-90],
['a1x1x2', m1, 9,-20, 4, 36, 0,0,90],
['a1x1x2', m1, 9,-20, -4, 36, 0,0,90],
['a1x2x2', m1, 9,-20, 0, 36, 0,0,90],
['b2x3x1', m1, 9,-16, -4, 36, 0,0,0],
['t2x3x1', m1, 9, -8, 0, 36, 0,0,0],
['a1x1x2', m5, 10,-20, 0, 39, 0,0,90],
['a1x1x2', m5, 10, -4, 0, 39, 0,0,-90],
['b1x3x1', m5, 10, -8, 0, 39, 0,0,90],
['r1x1x1', m1, 10,-16, -4, 39, 0,0,90],
['r1x1x1', m1, 10,-12, -4, 39, 0,0,90],
['r1x1x1', m1, 10, -8, -4, 39, 0,0,90],
['r1x1x1', m1, 10, -8, 4, 39, 0,0,90],
['r1x1x1', m1, 10,-12, 4, 39, 0,0,90],
['r1x1x1', m1, 10,-16, 4, 39, 0,0,90],
['r1x3x1', m5, 11, -8, 0, 42, 0,0,90],
['b1x2x1', m1, 12, -8,-12, 12, 0,0,0],
['b1x2x1', m1, 12, -8, 8, 12, 0,0,0],
['b1x2x1', m3, 12, 0, 8, 12, 0,0,90],
['b1x2x1', m3, 12, 0, -8, 12, 0,0,90],
['b2x2x1', m1, 12, 16, 8, 6, 0,0,0],
['b2x2x1', m1, 12, 16,-12, 6, 0,0,0],
['l2x2x1', m1, 12, 12,-16, 6, 0,0,0],
['l2x2x1', m1, 12, 12, 16, 6, 0,0,-90],
['b1x1x1', m1, 12, 12, 8, 6, 0,0,0],
['b1x1x1', m1, 12, 8, 12, 6, 0,0,0],
['b1x1x1', m1, 12, 12, -8, 6, 0,0,0],
['b1x1x1', m1, 12, 8,-12, 6, 0,0,0],
['b1x3x1', m3, 12, 40, 0, 6, 0,0,90],
['b2x3x1', m1, 13, 4,-16, 3, 0,0,0],
['b2x3x1', m1, 13, 4, 8, 3, 0,0,0],
['l2x2x1', m1, 13, 12, 12, 3, 0,0,-90],
['l2x2x1', m1, 13, 12,-12, 3, 0,0,0],
['b1x2x1', m1, 14, 12,-16, 0, 0,0,90],
['b1x2x1', m1, 14, 12, 16, 0, 0,0,90],
['t2x3x1', m1, 14, 8, 12, 0, 0,0,-90],
['t2x3x1', m1, 14, 8,-12, 0, 0,0,90],
['a1x2x2', m2, 14, 4,-16, 0, 0,0,90],
['a1x2x2', m2, 14, 4, -8, 0, 0,0,90],
['a1x2x2', m2, 14, 4, 8, 0, 0,0,90],
['a1x2x2', m2, 14, 4, 16, 0, 0,0,90],
];

View File

@@ -446,9 +446,9 @@ model_list=[
['f1x2x1', m5, 29,-28, 12, 72, 0,0,90],
['f1x2x1', m5, 29,-28, 16, 72, 0,0,90],
['f1x2x1', m5, 29,-30, 12, 75, 0,0,0],
['c1x1x1', m5, 29,-30, 12, 78, 0,0,0],
['c1x1x1', m5, 29,-30, 12, 81, 0,0,0],
['c1x1x1', m7, 29,-30, 12, 84, 0,0,0],
['c1x1x1', m5, 29,-30, 14, 78, 0,0,0],
['c1x1x1', m5, 29,-30, 14, 81, 0,0,0],
['c1x1x1', m7, 29,-30, 14, 84, 0,0,0],
['b2x3x1', m5, 30, -8, 0, 57, 0,0,0],
['b2x3x1', m5, 30,-16, 0, 57, 0,0,0],
['b2x3x1', m5, 30,-24, 0, 57, 0,0,0],

View File

@@ -0,0 +1,139 @@
// block name, color, step, coord: x,y,z, rotation: x,y,z
const m1=0xffecca;
const m2=0xff0000;
const m3=0;
const m4=0xffffff;
model_list=[
['t2x3x1', m1, 0, 0, -8, 0, 0,0,90],
['t2x3x1', m2, 0, -8, -4, 0, 0,0,-90],
['t2x3x1', m2, 0, 8, -4, 0, 0,0,-90],
['b1x2x1', m2, 0,-20, 0, 0, 0,0,90],
['b1x2x1', m2, 0,-12, 0, 0, 0,0,0],
['b1x2x1', m2, 0, 12, 0, 0, 0,0,0],
['b1x2x1', m2, 0, 24, 0, 0, 0,0,90],
['b2x3x1', m2, 0, -8, 0, 0, 0,0,0],
['b2x3x1', m2, 0, 4, 0, 0, 0,0,0],
['b1x3x1', m2, 0, 0, 0, 0, 0,0,0],
['b2x3x1', m1, 1, 0,-12, 3, 0,0,90],
['b2x2x1', m1, 1, 4,-12, 3, 0,0,0],
['t2x3x1', m2, 1,-12, -4, 3, 0,0,-90],
['t2x3x1', m2, 1, 12, -4, 3, 0,0,-90],
['b2x3x1', m2, 1, 4, -4, 3, 0,0,90],
['b1x4x1', m2, 1, -8, 0, 3, 0,0,90],
['b1x4x1', m2, 1, 20, 0, 3, 0,0,90],
['b1x3x1', m2, 1, -8, 4, 3, 0,0,90],
['b1x3x1', m2, 1, 4, 4, 3, 0,0,90],
['b1x3x1', m2, 1, 16, 4, 3, 0,0,90],
['l2x2x1', m2, 1, -8, 8, 3, 0,0,90],
['l2x2x1', m2, 1, 8, 8, 3, 0,0,0],
['b2x3x1', m2, 1, 4, 8, 3, 0,0,90],
['b2x3x1', m1, 2, 4,-12, 6, 0,0,90],
['b2x3x1', m2, 2, -8, -4, 6, 0,0,0],
['b2x3x1', m2, 2, 4, -4, 6, 0,0,0],
['b2x3x1', m2, 2, -4, 8, 6, 0,0,90],
['b2x4x1', m2, 2, 12, 8, 6, 0,0,90],
['b1x4x1', m2, 2,-16, -4, 6, 0,0,0],
['b1x4x1', m2, 2, 16, -4, 6, 0,0,0],
['b1x3x1', m2, 2, -8, -8, 6, 0,0,90],
['b1x3x1', m2, 2, 16, -8, 6, 0,0,90],
['b1x2x1', m2, 2, -8,-12, 6, 0,0,90],
['b1x2x1', m2, 2, 12,-12, 6, 0,0,90],
['b1x1x1', m2, 3,-28, 4, 3, 0,0,0],
['b1x1x1', m2, 3, 28, 4, 3, 0,0,0],
['t2x3x1', m2, 3,-24, 4, 6, 0,0,-90],
['t2x3x1', m2, 3, 24, 4, 6, 0,0,-90],
['b1x3x1', m2, 3,-16, 0, 9, 0,0,90],
['b1x3x1', m2, 3, 24, 0, 9, 0,0,90],
['l2x2x1', m2, 3,-16, -4, 9, 0,0,-90],
['l2x2x1', m2, 3, 16, -4, 9, 0,0,-180],
['b2x3x1', m2, 3, -4,-12, 9, 0,0,90],
['b2x4x1', m2, 3, 12,-12, 9, 0,0,90],
['b2x2x1', m2, 3,-16, 4, 9, 0,0,0],
['b2x2x1', m2, 3, 12, 4, 9, 0,0,0],
['b1x4x1', m2, 3, 0, 12, 9, 0,0,90],
['b1x3x1', m2, 3, 12, 12, 9, 0,0,90],
['b1x4x1', m2, 4, 28, 4, 12, 0,0,90],
['b1x4x1', m2, 4,-16, 4, 12, 0,0,90],
['l2x2x1', m2, 4,-12, 8, 12, 0,0,90],
['l2x2x1', m2, 4, 12, 8, 12, 0,0,0],
['b2x2x1', m2, 4, -8, 8, 12, 0,0,0],
['b2x3x1', m2, 4, 8, 8, 12, 0,0,90],
['b2x2x1', m2, 4,-16, -4, 12, 0,0,0],
['b2x2x1', m2, 4, 12, -4, 12, 0,0,0],
['b2x3x1', m2, 4, 4,-12, 12, 0,0,90],
['a1x2x2', m2, 4,-12, -8, 12, 0,0,90],
['a1x2x2', m2, 4, -8,-12, 12, 0,0,90],
['a1x2x2', m2, 4, 8,-12, 12, 0,0,-90],
['a1x2x2', m2, 4, 12, -8, 12, 0,0,-90],
['b1x1x1', m2, 5,-28, 4, 15, 0,0,0],
['b1x1x1', m2, 5, 28, 4, 15, 0,0,0],
['b1x2x1', m2, 5,-16, 0, 15, 0,0,0],
['b1x2x1', m2, 5, 16, 0, 15, 0,0,0],
['b1x3x1', m2, 5,-12, 0, 15, 0,0,0],
['b1x3x1', m2, 5, 12, 0, 15, 0,0,0],
['b2x3x1', m2, 5, 0, 8, 15, 0,0,90],
['b2x2x1', m2, 5, 4, 8, 15, 0,0,0],
['b2x2x1', m2, 5, 4, -8, 15, 0,0,0],
['b2x3x1', m2, 5, 0, -8, 15, 0,0,90],
['a1x2x2', m2, 5,-12, -4, 15, 0,0,90],
['a1x2x2', m2, 5, 12, -4, 15, 0,0,-90],
['r1x3x1', m3, 5, 4,-12, 15, 0,0,90],
['r1x1x1', m2, 5, -8,-12, 15, 0,0,0],
['r1x1x1', m2, 5, 8,-12, 15, 0,0,0],
['r1x1x1', m2, 5, 12, -8, 15, 0,0,0],
['r1x1x1', m2, 5,-12, -8, 15, 0,0,0],
['u1x2x1', m2, 6,-20, 0, 15, 0,0,90],
['t2x3x1', m2, 6,-20, 0, 18, 0,0,0],
['u1x2x2', m2, 6,-24, 0, 18, 0,0,90],
['u1x2x1', m2, 6, 20, 0, 15, 0,0,-90],
['t2x3x1', m2, 6, 20, 0, 18, 0,0,180],
['u1x2x2', m2, 6, 24, 0, 18, 0,0,-90],
['b1x2x1', m2, 6,-12, 0, 18, 0,0,0],
['b1x2x1', m2, 6, 12, 0, 18, 0,0,0],
['b2x4x1', m2, 6, -8, -4, 18, 0,0,0],
['b2x4x1', m2, 6, 0, -4, 18, 0,0,0],
['b1x4x1', m2, 6, 8, -4, 18, 0,0,0],
['r1x1x1', m2, 6,-12, -4, 18, 0,0,0],
['r1x1x1', m2, 6, 12, -4, 18, 0,0,0],
['r1x1x1', m3, 6, -8, -8, 18, 0,0,0],
['r1x1x1', m3, 6, 8, -8, 18, 0,0,0],
['b1x3x1', m2, 6, 4, -8, 18, 0,0,90],
['b1x3x1', m2, 7,-16, 4, 21, 0,0,90],
['b1x3x1', m2, 7, 24, 4, 21, 0,0,90],
['b2x3x1', m2, 7, 24, -4, 21, 0,0,90],
['b2x3x1', m2, 7,-16, -4, 21, 0,0,90],
['b1x2x1', m2, 7, -8, -4, 21, 0,0,0],
['b1x2x1', m2, 7, 8, -4, 21, 0,0,0],
['a1x1x2', m2, 8,-24, -4, 24, 0,0,90],
['a1x1x2', m2, 8, 24, -4, 24, 0,0,-90],
['l2x2x1', m2, 8, 24, 0, 24, 0,0,0],
['l2x2x1', m2, 8,-24, 0, 24, 0,0,90],
['b1x3x1', m2, 8,-16, -4, 24, 0,0,0],
['b1x3x1', m2, 8, 16, -4, 24, 0,0,0],
['b1x3x1', m2, 8, -4, 0, 24, 0,0,90],
['b1x3x1', m2, 8, 12, 0, 24, 0,0,90],
['b1x3x1', m4, 8, 12, -4, 24, 0,0,90],
['b1x3x1', m4, 8, -4, -4, 24, 0,0,90],
['a1x1x2', m2, 9,-28, 0, 27, 0,0,90],
['a1x1x2', m2, 9, 28, 0, 27, 0,0,-90],
['l2x2x1', m2, 9, 24, 4, 27, 0,0,180],
['l2x2x1', m2, 9, 20, 0, 27, 0,0,180],
['l2x2x1', m2, 9,-24, 4, 27, 0,0,-90],
['l2x2x1', m2, 9,-20, 0, 27, 0,0,-90],
['b1x3x1', m2, 9, -4, 0, 27, 0,0,90],
['b1x3x1', m2, 9, 12, 0, 27, 0,0,90],
['b1x1x1', m4, 9,-12, -4, 27, 0,0,90],
['b1x1x1', m4, 9, -4, -4, 27, 0,0,90],
['b1x1x1', m4, 9, 4, -4, 27, 0,0,90],
['b1x1x1', m4, 9, 12, -4, 27, 0,0,90],
['c1x1x1', m3, 9, -8, -4, 27, 0,0,90],
['c1x1x1', m3, 9, 8, -4, 27, 0,0,90],
['b1x2x1', m2, 10,-20, 0, 30, 0,0,90],
['b1x2x1', m2, 10, 24, 0, 30, 0,0,90],
['r1x3x1', m2, 10, -4, 0, 30, 0,0,90],
['r1x3x1', m2, 10, 12, 0, 30, 0,0,90],
['r1x3x1', m4, 10, 12, -4, 30, 0,0,90],
['r1x3x1', m4, 10, -4, -4, 30, 0,0,90],
];

View File

@@ -23,6 +23,12 @@ macro matr_cell c_funct,c_param,funct,param, dia
dia dword[esp-4*(c_param*(c_funct-funct)+(1+c_param-param))]
}
;Macro for double type parameters (8 bytes)
macro glpush GLDoubleVar {
push dword[GLDoubleVar+4]
push dword[GLDoubleVar]
}
align 4
start:
load_library name_tgl, library_path, system_path, import_tinygl
@@ -895,8 +901,22 @@ endp
;--------------------------------------------------
include '../import.inc'
align 4
import_tinygl:
macro E_LIB n
{
n dd sz_#n
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
sz_#n db `n,0
}
include '../export.inc'
;--------------------------------------------------
system_path db '/sys/lib/'
name_tgl db 'tinygl.obj',0
;--------------------------------------------------

View File

@@ -1,7 +1,3 @@
; SPDX-License-Identifier: GPL-2.0-only
; Test 3 - example of drawing triangles
; Copyright (C) 2014-2025 KolibriOS team
use32
org 0
db 'MENUET01'
@@ -12,14 +8,13 @@ include '../../../../../macros.inc'
include '../../../../../KOSfuncs.inc'
include '../../../../../load_lib.mac'
include '../../../../../dll.inc'
include '../kosgl.inc'
include '../opengl_const.inc'
@use_library
align 4
start:
load_library name_tgl, library_path, system_path, import_tinygl
load_library name_tgl, library_path, system_path, import_lib_tinygl
cmp eax,SF_TERMINATE_PROCESS
jz button.exit
@@ -39,11 +34,11 @@ red_win:
align 16
still:
mcall SF_WAIT_EVENT
cmp al,EV_REDRAW
cmp al,1
jz red_win
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
jmp still
@@ -104,7 +99,7 @@ caption db 'Test tinygl library, [Esc] - exit, [<-] and [->] - rotate',0
align 4
draw_3d:
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;clear the color and depth buffer
stdcall [glClear], GL_COLOR_BUFFER_BIT + GL_DEPTH_BUFFER_BIT ;очистим буфер цвета и глубины
call [glPushMatrix]
stdcall [glRotatef], [angle_z],0.0,0.0,1.0
@@ -141,15 +136,30 @@ angle_z dd 15.0
delt_size dd 3.0
;--------------------------------------------------
include '../import.inc' ;tinygl
align 4
import_lib_tinygl:
macro E_LIB n
{
n dd sz_#n
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
sz_#n db `n,0
}
include '../export.inc'
;--------------------------------------------------
system_path db '/sys/lib/'
name_tgl db 'tinygl.obj',0
;--------------------------------------------------
align 16
i_end:
ctx1 TinyGLContext
ctx1 rb 28 ;TinyGLContext or KOSGLContext
;sizeof.TinyGLContext = 28
cur_dir_path rb 4096
library_path rb 4096
rb 1024

View File

@@ -1,7 +1,3 @@
; SPDX-License-Identifier: GPL-2.0-only
; Test array1 - example of using vertex array functions
; Copyright (C) 2014-2025 KolibriOS team
use32
org 0
db 'MENUET01'
@@ -12,7 +8,6 @@ include '../../../../../macros.inc'
include '../../../../../KOSfuncs.inc'
include '../../../../../load_lib.mac'
include '../../../../../dll.inc'
include '../kosgl.inc'
include '../opengl_const.inc'
@use_library
@@ -196,15 +191,29 @@ align 4
Indices rb FACES_COUNT*6 ;3 points per edge, point index 2 bytes
;--------------------------------------------------
include '../import.inc' ;tinygl
align 4
import_tinygl:
macro E_LIB n
{
n dd sz_#n
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
sz_#n db `n,0
}
include '../export.inc'
;--------------------------------------------------
system_path db '/sys/lib/'
name_tgl db 'tinygl.obj',0
;--------------------------------------------------
align 4
i_end:
ctx1 TinyGLContext
ctx1 rb 28 ;sizeof.TinyGLContext = 28
cur_dir_path rb 4096
library_path rb 4096
rb 4096

View File

@@ -490,9 +490,127 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; Цвет и интенсивность ос
lmodel_ambient dd 0.2, 0.2, 0.2, 1.0 ; Параметры фонового освещения
;--------------------------------------------------
include '../import.inc' ;tinygl
include '../../../buf2d/import.inc'
include '../../../libs-dev/libimg/import.inc'
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include '../export.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_libimg:
dd alib_init1
; img_is_img dd aimg_is_img
; img_info dd aimg_info
; img_from_file dd aimg_from_file
; img_to_file dd aimg_to_file
; img_from_rgb dd aimg_from_rgb
; img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
; img_encode dd aimg_encode
; img_create dd aimg_create
img_destroy dd aimg_destroy
; img_destroy_layer dd aimg_destroy_layer
; img_count dd aimg_count
; img_lock_bits dd aimg_lock_bits
; img_unlock_bits dd aimg_unlock_bits
; img_flip dd aimg_flip
; img_flip_layer dd aimg_flip_layer
; img_rotate dd aimg_rotate
; img_rotate_layer dd aimg_rotate_layer
; img_draw dd aimg_draw
; img_convert dd aimg_convert
dd 0,0
alib_init1 db 'lib_init',0
; aimg_is_img db 'img_is_img',0 ;определяет по данным, может ли библиотека сделать из них изображение
; aimg_info db 'img_info',0
; aimg_from_file db 'img_from_file',0
; aimg_to_file db 'img_to_file',0
; aimg_from_rgb db 'img_from_rgb',0
; aimg_to_rgb db 'img_to_rgb',0 ;преобразование изображения в данные RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;автоматически определяет формат графических данных
; aimg_encode db 'img_encode',0
; aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
; aimg_destroy_layer db 'img_destroy_layer',0
; aimg_count db 'img_count',0
; aimg_lock_bits db 'img_lock_bits',0
; aimg_unlock_bits db 'img_unlock_bits',0
; aimg_flip db 'img_flip',0
; aimg_flip_layer db 'img_flip_layer',0
; aimg_rotate db 'img_rotate',0
; aimg_rotate_layer db 'img_rotate_layer',0
; aimg_draw db 'img_draw',0
; aimg_convert db 'img_convert',0
;--------------------------------------------------
system_dir_0 db '/sys/lib/'

View File

@@ -473,9 +473,127 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; Цвет и интенсивность ос
lmodel_ambient dd 0.2, 0.2, 0.2, 1.0 ; Параметры фонового освещения
;--------------------------------------------------
include '../import.inc' ;tinygl
include '../../../buf2d/import.inc'
include '../../../libs-dev/libimg/import.inc'
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include '../export.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_libimg:
dd alib_init1
; img_is_img dd aimg_is_img
; img_info dd aimg_info
; img_from_file dd aimg_from_file
; img_to_file dd aimg_to_file
; img_from_rgb dd aimg_from_rgb
; img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
; img_encode dd aimg_encode
; img_create dd aimg_create
img_destroy dd aimg_destroy
; img_destroy_layer dd aimg_destroy_layer
; img_count dd aimg_count
; img_lock_bits dd aimg_lock_bits
; img_unlock_bits dd aimg_unlock_bits
; img_flip dd aimg_flip
; img_flip_layer dd aimg_flip_layer
; img_rotate dd aimg_rotate
; img_rotate_layer dd aimg_rotate_layer
; img_draw dd aimg_draw
; img_convert dd aimg_convert
dd 0,0
alib_init1 db 'lib_init',0
; aimg_is_img db 'img_is_img',0 ;определяет по данным, может ли библиотека сделать из них изображение
; aimg_info db 'img_info',0
; aimg_from_file db 'img_from_file',0
; aimg_to_file db 'img_to_file',0
; aimg_from_rgb db 'img_from_rgb',0
; aimg_to_rgb db 'img_to_rgb',0 ;преобразование изображения в данные RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;автоматически определяет формат графических данных
; aimg_encode db 'img_encode',0
; aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
; aimg_destroy_layer db 'img_destroy_layer',0
; aimg_count db 'img_count',0
; aimg_lock_bits db 'img_lock_bits',0
; aimg_unlock_bits db 'img_unlock_bits',0
; aimg_flip db 'img_flip',0
; aimg_flip_layer db 'img_flip_layer',0
; aimg_rotate db 'img_rotate',0
; aimg_rotate_layer db 'img_rotate_layer',0
; aimg_draw db 'img_draw',0
; aimg_convert db 'img_convert',0
;--------------------------------------------------
system_dir_0 db '/sys/lib/'

View File

@@ -433,9 +433,127 @@ white_light dd 0.8, 0.8, 0.8, 1.0 ; Цвет и интенсивность ос
lmodel_ambient dd 0.2, 0.2, 0.2, 1.0 ; Параметры фонового освещения
;--------------------------------------------------
include '../import.inc' ;tinygl
include '../../../buf2d/import.inc'
include '../../../libs-dev/libimg/import.inc'
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include '../export.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_libimg:
dd alib_init1
; img_is_img dd aimg_is_img
; img_info dd aimg_info
; img_from_file dd aimg_from_file
; img_to_file dd aimg_to_file
; img_from_rgb dd aimg_from_rgb
; img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
; img_encode dd aimg_encode
; img_create dd aimg_create
img_destroy dd aimg_destroy
; img_destroy_layer dd aimg_destroy_layer
; img_count dd aimg_count
; img_lock_bits dd aimg_lock_bits
; img_unlock_bits dd aimg_unlock_bits
; img_flip dd aimg_flip
; img_flip_layer dd aimg_flip_layer
; img_rotate dd aimg_rotate
; img_rotate_layer dd aimg_rotate_layer
; img_draw dd aimg_draw
; img_convert dd aimg_convert
dd 0,0
alib_init1 db 'lib_init',0
; aimg_is_img db 'img_is_img',0 ;определяет по данным, может ли библиотека сделать из них изображение
; aimg_info db 'img_info',0
; aimg_from_file db 'img_from_file',0
; aimg_to_file db 'img_to_file',0
; aimg_from_rgb db 'img_from_rgb',0
; aimg_to_rgb db 'img_to_rgb',0 ;преобразование изображения в данные RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;автоматически определяет формат графических данных
; aimg_encode db 'img_encode',0
; aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
; aimg_destroy_layer db 'img_destroy_layer',0
; aimg_count db 'img_count',0
; aimg_lock_bits db 'img_lock_bits',0
; aimg_unlock_bits db 'img_unlock_bits',0
; aimg_flip db 'img_flip',0
; aimg_flip_layer db 'img_flip_layer',0
; aimg_rotate db 'img_rotate',0
; aimg_rotate_layer db 'img_rotate_layer',0
; aimg_draw db 'img_draw',0
; aimg_convert db 'img_convert',0
;--------------------------------------------------
system_dir_0 db '/sys/lib/'

View File

@@ -364,9 +364,127 @@ angle_y dd 0.0
delt_size dd 3.0
;--------------------------------------------------
include '../import.inc' ;tinygl
include '../../../buf2d/import.inc'
include '../../../libs-dev/libimg/import.inc'
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include '../export.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_libimg:
dd alib_init1
; img_is_img dd aimg_is_img
; img_info dd aimg_info
; img_from_file dd aimg_from_file
; img_to_file dd aimg_to_file
; img_from_rgb dd aimg_from_rgb
; img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
; img_encode dd aimg_encode
; img_create dd aimg_create
img_destroy dd aimg_destroy
; img_destroy_layer dd aimg_destroy_layer
; img_count dd aimg_count
; img_lock_bits dd aimg_lock_bits
; img_unlock_bits dd aimg_unlock_bits
; img_flip dd aimg_flip
; img_flip_layer dd aimg_flip_layer
; img_rotate dd aimg_rotate
; img_rotate_layer dd aimg_rotate_layer
; img_draw dd aimg_draw
; img_convert dd aimg_convert
dd 0,0
alib_init1 db 'lib_init',0
; aimg_is_img db 'img_is_img',0 ;определяет по данным, может ли библиотека сделать из них изображение
; aimg_info db 'img_info',0
; aimg_from_file db 'img_from_file',0
; aimg_to_file db 'img_to_file',0
; aimg_from_rgb db 'img_from_rgb',0
; aimg_to_rgb db 'img_to_rgb',0 ;преобразование изображения в данные RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;автоматически определяет формат графических данных
; aimg_encode db 'img_encode',0
; aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
; aimg_destroy_layer db 'img_destroy_layer',0
; aimg_count db 'img_count',0
; aimg_lock_bits db 'img_lock_bits',0
; aimg_unlock_bits db 'img_unlock_bits',0
; aimg_flip db 'img_flip',0
; aimg_flip_layer db 'img_flip_layer',0
; aimg_rotate db 'img_rotate',0
; aimg_rotate_layer db 'img_rotate_layer',0
; aimg_draw db 'img_draw',0
; aimg_convert db 'img_convert',0
;--------------------------------------------------
system_dir_0 db '/sys/lib/'

View File

@@ -315,9 +315,127 @@ angle_y dd 0.0
delt_size dd 3.0
;--------------------------------------------------
include '../import.inc' ;tinygl
include '../../../buf2d/import.inc'
include '../../../libs-dev/libimg/import.inc'
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include '../export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include '../export.inc'
align 4
import_buf2d:
dd sz_init0
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init0 db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_libimg:
dd alib_init1
; img_is_img dd aimg_is_img
; img_info dd aimg_info
; img_from_file dd aimg_from_file
; img_to_file dd aimg_to_file
; img_from_rgb dd aimg_from_rgb
; img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
; img_encode dd aimg_encode
; img_create dd aimg_create
img_destroy dd aimg_destroy
; img_destroy_layer dd aimg_destroy_layer
; img_count dd aimg_count
; img_lock_bits dd aimg_lock_bits
; img_unlock_bits dd aimg_unlock_bits
; img_flip dd aimg_flip
; img_flip_layer dd aimg_flip_layer
; img_rotate dd aimg_rotate
; img_rotate_layer dd aimg_rotate_layer
; img_draw dd aimg_draw
; img_convert dd aimg_convert
dd 0,0
alib_init1 db 'lib_init',0
; aimg_is_img db 'img_is_img',0 ;определяет по данным, может ли библиотека сделать из них изображение
; aimg_info db 'img_info',0
; aimg_from_file db 'img_from_file',0
; aimg_to_file db 'img_to_file',0
; aimg_from_rgb db 'img_from_rgb',0
; aimg_to_rgb db 'img_to_rgb',0 ;преобразование изображения в данные RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;автоматически определяет формат графических данных
; aimg_encode db 'img_encode',0
; aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
; aimg_destroy_layer db 'img_destroy_layer',0
; aimg_count db 'img_count',0
; aimg_lock_bits db 'img_lock_bits',0
; aimg_unlock_bits db 'img_unlock_bits',0
; aimg_flip db 'img_flip',0
; aimg_flip_layer db 'img_flip_layer',0
; aimg_rotate db 'img_rotate',0
; aimg_rotate_layer db 'img_rotate_layer',0
; aimg_draw db 'img_draw',0
; aimg_convert db 'img_convert',0
;--------------------------------------------------
system_dir_0 db '/sys/lib/'

View File

@@ -1,18 +0,0 @@
align 4
import_tinygl:
macro E_LIB n
{
if defined sz_#n
n dd sz_#n
end if
}
include 'export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include 'export.inc'

View File

@@ -49,9 +49,9 @@ include '../../../../../load_lib.mac'
;--- Start of program ----------------------------------------------
;---------------------------------------------------------------------
START:
mcall SF_SYS_MISC,SSF_HEAP_INIT
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1
mcall SF_SET_EVENTS_MASK,0x27
mcall 68,11
mcall 66,1,1
mcall 40,0x27
;---------------------------------------------------------------------
load_libraries l_libs_start,end_l_libs
@@ -84,7 +84,7 @@ load_libraries l_libs_start,end_l_libs
copy_path icons_file_name,path,library_path,0
mcall SF_FILE,fileinfo
mcall 70,fileinfo
mov [fileinfo+0],dword 0
@@ -93,14 +93,14 @@ load_libraries l_libs_start,end_l_libs
mov [img_size],ecx
mcall SF_SYS_MISC,SSF_MEM_ALLOC
mcall 68,12
mov [fileinfo+16],eax
mov [image_file],eax
mcall SF_FILE,fileinfo
mcall 70,fileinfo
xor eax,eax
mov [return_code],eax
@@ -108,7 +108,8 @@ load_libraries l_libs_start,end_l_libs
push image_file
call [cnv_png_import.Start]
mcall SF_SYS_MISC,SSF_MEM_FREE,[image_file]
mov ecx,[image_file]
mcall 68,13,
cmp [return_code],dword 0
jne button.exit
@@ -150,28 +151,28 @@ load_libraries l_libs_start,end_l_libs
red:
call draw_window
still:
mcall SF_WAIT_EVENT
mcall 10
cmp eax,EV_REDRAW
cmp eax,1
je red
cmp eax,EV_KEY
cmp eax,2
je key
cmp eax,EV_BUTTON
cmp eax,3
je button
cmp eax,EV_MOUSE
cmp eax,6
je mouse
jmp still
;---------------------------------------------------------------------
key:
mcall SF_GET_KEY
mcall 2
jmp still
;---------------------------------------------------------------------
button:
mcall SF_GET_BUTTON
mcall 17
cmp ah,1
jne still
.exit:
mcall SF_TERMINATE_PROCESS
mcall -1
;---------------------------------------------------------------------
mouse:
;-----------------------------------------------
@@ -183,7 +184,7 @@ mouse:
jbe .horizontal
; mouse event for Vertical ScrollBar
push dword scroll_bar_data_vertical
call [scrollbar_v_mouse]
call [scrollbar_ver_mouse]
mov eax,scroll_bar_data_vertical.redraw
xor ebx,ebx
cmp [eax],ebx
@@ -199,7 +200,7 @@ mouse:
jbe .other
; mouse event for Horizontal ScrollBar
push dword scroll_bar_data_horizontal
call [scrollbar_h_mouse]
call [scrollbar_hor_mouse]
mov eax,scroll_bar_data_horizontal.redraw
xor ebx,ebx
cmp [eax],ebx
@@ -239,7 +240,7 @@ mouse:
.mouse_dinamic_button:
; mouse event for Dinamic Button 1
push dword dinamic_button_data_1
call [dbutton_mouse]
call [dinamic_button_mouse]
mov eax,dinamic_button_data_1.click
cmp [eax],dword 1
jne @f
@@ -248,7 +249,7 @@ mouse:
@@:
; mouse event for Dinamic Button 2
push dword dinamic_button_data_2
call [dbutton_mouse]
call [dinamic_button_mouse]
mov eax,dinamic_button_data_2.click
cmp [eax],dword 1
jne still ;@f
@@ -282,7 +283,7 @@ analyse_out_menu_2:
jmp still
;---------------------------------------------------------------------
about:
mcall SF_CREATE_THREAD,1,thread3,thread
mcall 51,1,thread3,thread
jmp still
;---------------------------------------------------------------------
OpenDialog_start_0:
@@ -319,9 +320,9 @@ OpenDialog_start:
;---------------------------------------------------------------------
;---------------------------------------------------------------------
draw_window:
mcall SF_REDRAW,SSF_BEGIN_DRAW
mcall SF_CREATE_WINDOW,<0,400>,<0,400>,0x03AABBCC,0x805080D0,0x005080D0
mcall SF_SET_CAPTION,1,header_1
mcall 12,1
mcall 0,<0,400>,<0,400>,0x03AABBCC,0x805080D0,0x005080D0
mcall 71,1,header_1
;---------------------------------------------
; draw for Menu 1
push dword menu_data_1
@@ -332,15 +333,15 @@ draw_window:
;---------------------------------------------
; draw for Dinamic Button 1
push dword dinamic_button_data_1
call [dbutton_draw]
call [dinamic_button_draw]
; draw for Dinamic Button 2
push dword dinamic_button_data_2
call [dbutton_draw]
call [dinamic_button_draw]
;---------------------------------------------
mcall SF_DRAW_RECT,<170,200>,<25,15>,0xffffb0
mcall 13,<170,200>,<25,15>,0xffffb0
; mov bx,28
; add ebx,2 shl 16
; mcall SF_DRAW_TEXT,,0xC0000000,text_work_area,,0xffffb0
; mcall 4,,0xC0000000,text_work_area,,0xffffb0
; draw for PathShow
push dword PathShow_data_1
call [PathShow_draw]
@@ -356,21 +357,21 @@ draw_window:
; draw for Vertical ScrollBar
push dword scroll_bar_data_vertical
call [scrollbar_v_draw]
call [scrollbar_ver_draw]
; draw for Horizontal ScrollBar
push dword scroll_bar_data_horizontal
call [scrollbar_h_draw]
call [scrollbar_hor_draw]
; reset all_redraw flag
xor eax,eax
mov [scroll_bar_data_vertical.all_redraw],eax
mov [scroll_bar_data_horizontal.all_redraw],eax
;---------------------------------------------
call draw_cube
mcall SF_REDRAW,SSF_END_DRAW
mcall 12,2
ret
;---------------------------------------------------------------------
draw_cube:
mcall SF_DRAW_RECT,<30,301>,<50,301>,0xafafaf
mcall 13,<30,301>,<50,301>,0xafafaf
mov ecx,[scroll_bar_data_vertical.position]
add ecx,50
shl ecx,16
@@ -379,7 +380,7 @@ draw_cube:
add ebx,30
shl ebx,16
mov bx,30
mcall SF_DRAW_RECT,,,0x0
mcall 13,,,0x0
ret
;---------------------------------------------------------------------
include 'data.inc'

View File

@@ -30,7 +30,7 @@ system_dir_ProcLib db '/sys/lib/proc_lib.obj',0
align 4
l_libs_start:
library01 l_libs system_dir_Boxlib+9, file_name, system_dir_Boxlib,\
import_box_lib, plugins_directory
Box_lib_import, plugins_directory
library02 l_libs system_dir_CnvPNG+9, file_name, system_dir_CnvPNG,\
cnv_png_import, plugins_directory
@@ -126,7 +126,91 @@ deflate_unpack dd 0
;---------------------------------------------------------------------
;---------------------------------------------------------------------
include '../../import.inc' ;import_box_lib
align 4
Box_lib_import:
;init_lib dd a_init
;version_lib dd a_version
;edit_box_draw dd aEdit_box_draw
;edit_box_key dd aEdit_box_key
;edit_box_mouse dd aEdit_box_mouse
;version_ed dd aVersion_ed
;check_box_draw dd aCheck_box_draw
;check_box_mouse dd aCheck_box_mouse
;version_ch dd aVersion_ch
;option_box_draw dd aOption_box_draw
;option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op
scrollbar_ver_draw dd aScrollbar_ver_draw
scrollbar_ver_mouse dd aScrollbar_ver_mouse
scrollbar_hor_draw dd aScrollbar_hor_draw
scrollbar_hor_mouse dd aScrollbar_hor_mouse
;version_scrollbar dd aVersion_scrollbar
dinamic_button_draw dd aDbutton_draw
dinamic_button_mouse dd aDbutton_mouse
;version_dbutton dd aVersion_dbutton
menu_bar_draw dd aMenu_bar_draw
menu_bar_mouse dd aMenu_bar_mouse
menu_bar_activate dd aMenu_bar_activate
;version_menu_bar dd aVersion_menu_bar
;FileBrowser_draw dd aFileBrowser_draw
;FileBrowser_mouse dd aFileBrowser_mouse
;FileBrowser_key dd aFileBrowser_key
;Version_FileBrowser dd aVersion_FileBrowser
PathShow_prepare dd sz_PathShow_prepare
PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show
dd 0,0
;a_init db 'lib_init',0
;a_version db 'version',0
;aEdit_box_draw db 'edit_box_draw',0
;aEdit_box_key db 'edit_box_key',0
;aEdit_box_mouse db 'edit_box_mouse',0
;aVersion_ed db 'version_ed',0
;aCheck_box_draw db 'check_box_draw',0
;aCheck_box_mouse db 'check_box_mouse',0
;aVersion_ch db 'version_ch',0
;aOption_box_draw db 'option_box_draw',0
;aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0
aScrollbar_ver_draw db 'scrollbar_v_draw',0
aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
aScrollbar_hor_draw db 'scrollbar_h_draw',0
aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
;aVersion_scrollbar db 'version_scrollbar',0
aDbutton_draw db 'dbutton_draw',0
aDbutton_mouse db 'dbutton_mouse',0
;aVersion_dbutton db 'version_dbutton',0
aMenu_bar_draw db 'menu_bar_draw',0
aMenu_bar_mouse db 'menu_bar_mouse',0
aMenu_bar_activate db 'menu_bar_activate',0
;aVersion_menu_bar db 'version_menu_bar',0
;aFileBrowser_draw db 'FileBrowser_draw',0
;aFileBrowser_mouse db 'FileBrowser_mouse',0
;aFileBrowser_key db 'FileBrowser_key',0
;aVersion_FileBrowser db 'version_FileBrowser',0
sz_PathShow_prepare db 'PathShow_prepare',0
sz_PathShow_draw db 'PathShow_draw',0
;szVersion_path_show db 'version_PathShow',0
;---------------------------------------------------------------------
;---------------------------------------------------------------------
align 4

View File

@@ -18,7 +18,7 @@ include '../../../../../load_lib.mac'
@use_library ;use load lib macros
start:
;universal load library/librarys
sys_load_library library_name, library_path, system_path, import_box_lib
sys_load_library library_name, library_path, system_path, myimport
;if return code =-1 then exit, else nornary work
cmp eax,-1
jz exit
@@ -116,7 +116,37 @@ library_name db 'box_lib.obj',0
;library_name db 'box_lib.obj',0
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
include '../../import.inc' ;creating a function import table
myimport:
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
version_ed dd aVersion_ed
init_checkbox dd aInit_checkbox
check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse
version_ch dd aVersion_ch
option_box_draw dd aOption_box_draw
option_box_mouse dd aOption_box_mouse
version_op dd aVersion_op
dd 0,0
aEdit_box_draw db 'edit_box_draw',0
aEdit_box_key db 'edit_box_key',0
aEdit_box_mouse db 'edit_box_mouse',0
aVersion_ed db 'version_ed',0
aInit_checkbox db 'init_checkbox2',0
aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0
aVersion_ch db 'version_ch2',0
aOption_box_draw db 'option_box_draw',0
aOption_box_mouse db 'option_box_mouse',0
aVersion_op db 'version_op',0
check1 check_box2 (10 shl 16 + 12),(45 shl 16 + 12),5,0x80AABBCC,0,0,check_text1,ch_flag_en

View File

@@ -34,14 +34,14 @@ START:
;---------------------------------------------------------------------
;--- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ----------------------------------------
;---------------------------------------------------------------------
mcall SF_SYS_MISC, SSF_HEAP_INIT
mcall 68, 11
mcall SF_SET_EVENTS_MASK, $C0000027 ; <20><>᪠ ᮡ<>⨩ - <20><><EFBFBD><EFBFBD> ⮫쪮 <20> <20><><EFBFBD><E2A8A2><EFBFBD> <20><><EFBFBD><EFBFBD>
mcall 40, $C0000027 ; <20><>᪠ ᮡ<>⨩ - <20><><EFBFBD><EFBFBD> ⮫쪮 <20> <20><><EFBFBD><E2A8A2><EFBFBD> <20><><EFBFBD><EFBFBD>
sys_load_library lib_name, lib_path, sys_path, import_box_lib
sys_load_library lib_name, lib_path, sys_path, myimport
test eax,eax
jz @f
mcall SF_TERMINATE_PROCESS
mcall -1 ; alarm exit
@@:
@@ -56,16 +56,16 @@ call draw_window ;
;---------------------------------------------------------------------
still:
mcall SF_WAIT_EVENT_TIMEOUT, 5 ; <20><><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> 祬 0.05<EFBFBD>
mcall 23, 5 ; <20><EFBFBD><E3ADAA><EFBFBD> 23 - <20><><EFBFBD><EFBFBD><EFBFBD><><E1AEA1><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> 祬 0.05<EFBFBD>
test eax, eax ; <20><><EFBFBD><>⨩ - <20><EFBFBD><E0AEA2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A8AF> <20><><><E2A0A9><EFBFBD><EFBFBD>
je yield
cmp eax,EV_REDRAW
cmp eax,1 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1AEA2><EFBFBD> <20><><EFBFBD><EFBFBD> ?
je red ; <20><20><> - <20><> <20><><EFBFBD><EFBFBD><EFBFBD> red
cmp eax,EV_KEY
cmp eax,2 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
je key ; <20><20><> - <20><> key
cmp eax,EV_BUTTON
cmp eax,3 ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ?
je button ; <20><20><> - <20><> button
cmp eax,EV_MOUSE
cmp eax,6 ; ᮡ<><20><><EFBFBD><EFBFBD>
je mouse ; <20><20><> - <20><> mouse
jmp still ; <20><20><><EFBFBD><>⨥ - <20> <20><><EFBFBD><><E6A8AA>
@@ -81,21 +81,21 @@ invoke tooltip_mouse, redbox_tt
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><><E6A8AA>
key: ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall SF_GET_KEY ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> (<28> ah)
mcall 2 ; <20><EFBFBD><E3ADAA><EFBFBD> 2 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><><E1A8AC><EFBFBD><EFBFBD> (<28> ah)
jmp still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><><E6A8AA>
;---------------------------------------------------------------------
button:
mcall SF_GET_BUTTON ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall 17 ; 17 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E4A8AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cmp ah, 1 ; <20><20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD>஬ 1,
jne still ; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
pexit:
invoke tooltip_delete, redbox_tt ; <20><EFBFBD><E1A2AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mcall SF_TERMINATE_PROCESS
mcall -1 ; <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20>ணࠬ<E0AEA3><E0A0AC>
;---------------------------------------------------------------------
@@ -104,20 +104,20 @@ mcall SF_TERMINATE_PROCESS
draw_window:
mcall SF_REDRAW, SSF_BEGIN_DRAW
mcall 12, 1 ; <20><EFBFBD><E3ADAA><EFBFBD> 12: ᮮ<><E1AEAE><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AEA2>
mcall SF_STYLE_SETTINGS, SSF_GET_COLORS, sc, sizeof.system_colors
mcall 48, 3, sc,sizeof.system_colors
mov edx, [sc.work] ; 梥<><>
or edx, 0x33000000 ; <20> <20><><EFBFBD><EFBFBD> 3
mcall SF_CREATE_WINDOW, <200,300>, <200,150>, , ,title
mcall 0, <200,300>, <200,150>, , ,title
; <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E2A8AA>
mcall SF_DRAW_RECT, <60,50>, <50,50>, $FF0000
mcall SF_DRAW_RECT, <140,50>, <50,50>, $FF
mcall 13, <60,50>, <50,50>, $FF0000
mcall 13, <140,50>, <50,50>, $FF
mcall SF_REDRAW, SSF_END_DRAW
mcall 12, 2 ; <20><EFBFBD><E3ADAA><EFBFBD> 12.2, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1AEA2><EFBFBD>
ret ; <20><><EFBFBD><E5AEA4> <20><> <20><><EFBFBD><EFBFBD><E6A5A4><EFBFBD>
@@ -135,7 +135,22 @@ lib_name db 'box_lib.obj',0
cur_dir_path rb 4096
lib_path rb 4096
include '../../import.inc' ;import_box_lib
myimport:
dd sz_lib_init ;<3B><EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E1AAA0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ᮬ 1 ࠧ <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E7A5AD>
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20> <20>ணࠬ<E0AEA3><E0A0AC> <20><><20><> <20><><EFBFBD> <20><> <20><EFBFBD>
tooltip_init dd sz_tooltip_init
tooltip_delete dd sz_tooltip_delete
tooltip_test_show dd sz_tooltip_test_show
tooltip_mouse dd sz_tooltip_mouse
get_font_size dd sz_get_font_size
dd 0,0
sz_lib_init db 'lib_init',0
sz_tooltip_init db 'tooltip_init', 0
sz_tooltip_delete db 'tooltip_delete', 0
sz_tooltip_test_show db 'tooltip_test_show', 0
sz_tooltip_mouse db 'tooltip_mouse', 0
sz_get_font_size db 'get_font_size', 0
;tooltip txt, next, zone_x, zone_w, zone_y, zone_h, col_txt, col_bkg, tm_wait

View File

@@ -1,117 +0,0 @@
;
; Export functions
;
E_LIB lib_init
E_LIB version
E_LIB edit_box_draw
E_LIB edit_box_key
E_LIB edit_box_key_safe
E_LIB edit_box_mouse
E_LIB edit_box_set_text
E_LIB version_ed
E_LIB init_checkbox, init_checkbox2
E_LIB check_box_draw, check_box_draw2
E_LIB check_box_mouse, check_box_mouse2
E_LIB version_ch, version_ch2
E_LIB option_box_draw
E_LIB option_box_mouse
E_LIB version_op
E_LIB scrollbar_v_draw
E_LIB scrollbar_v_mouse
E_LIB scrollbar_h_draw
E_LIB scrollbar_h_mouse
E_LIB version_scrollbar
E_LIB dbutton_draw
E_LIB dbutton_mouse
E_LIB version_dbutton
E_LIB menu_bar_draw
E_LIB menu_bar_mouse
E_LIB menu_bar_activate
E_LIB version_menu_bar
E_LIB FileBrowser_draw
E_LIB FileBrowser_mouse
E_LIB FileBrowser_key
E_LIB version_FileBrowser
E_LIB tl_data_init
E_LIB tl_data_clear
E_LIB tl_info_clear
E_LIB tl_key
E_LIB tl_mouse
E_LIB tl_draw
E_LIB tl_info_undo
E_LIB tl_info_redo
E_LIB tl_node_add
E_LIB tl_node_set_data
E_LIB tl_node_get_data
E_LIB tl_node_delete
E_LIB tl_cur_beg
E_LIB tl_cur_next
E_LIB tl_cur_perv
E_LIB tl_node_close_open
E_LIB tl_node_lev_inc
E_LIB tl_node_lev_dec
E_LIB tl_node_move_up
E_LIB tl_node_move_down
E_LIB tl_node_poi_get_info
E_LIB tl_node_poi_get_next_info
E_LIB tl_node_poi_get_data
E_LIB tl_save_mem
E_LIB tl_load_mem
E_LIB tl_get_mem_size
E_LIB version_tree_list
E_LIB PathShow_prepare
E_LIB PathShow_draw
E_LIB version_PathShow
E_LIB ted_but_sumb_upper
E_LIB ted_but_sumb_lover
E_LIB ted_but_convert_by_table
E_LIB ted_can_save
E_LIB ted_clear
E_LIB ted_delete
E_LIB ted_draw
E_LIB ted_init
E_LIB ted_init_scroll_bars
E_LIB ted_init_syntax_file
E_LIB ted_is_select
E_LIB ted_key
E_LIB ted_mouse
E_LIB ted_open_file
E_LIB ted_save_file
E_LIB ted_text_add
E_LIB ted_but_select_word
E_LIB ted_but_cut
E_LIB ted_but_copy
E_LIB ted_but_paste
E_LIB ted_but_undo
E_LIB ted_but_redo
E_LIB ted_but_reverse
E_LIB ted_but_find
E_LIB ted_but_replace
E_LIB ted_text_colored
E_LIB ted_go_to_position
E_LIB version_text_edit
E_LIB frame_draw
E_LIB version_frame
E_LIB progressbar_draw
E_LIB progressbar_progress
E_LIB tooltip_init
E_LIB tooltip_delete
E_LIB tooltip_test_show
E_LIB tooltip_mouse
E_LIB get_font_size
purge E_LIB

View File

@@ -1,24 +0,0 @@
align 4
import_box_lib:
macro E_LIB n, lfn
{
if n eq lib_init
dd strz_#n
else if defined sz_#n
n dd sz_#n
end if
}
include 'export.inc'
dd 0,0
macro E_LIB n, lfn
{
if used n
if lfn eq
sz_#n db `n,0
else
sz_#n db `lfn,0
end if
end if
}
include 'export.inc'

View File

@@ -1,48 +0,0 @@
;
; Export functions
;
E_LIB lib_init
E_LIB buf2d_create
E_LIB buf2d_create_f_img
E_LIB buf2d_clear
E_LIB buf2d_draw
E_LIB buf2d_delete
E_LIB buf2d_resize
E_LIB buf2d_rotate
E_LIB buf2d_line
E_LIB buf2d_line_sm
E_LIB buf2d_rect_by_size
E_LIB buf2d_filled_rect_by_size
E_LIB buf2d_circle
E_LIB buf2d_img_hdiv2
E_LIB buf2d_img_wdiv2
E_LIB buf2d_conv_24_to_8
E_LIB buf2d_conv_24_to_32
E_LIB buf2d_bit_blt
E_LIB buf2d_bit_blt_transp
E_LIB buf2d_bit_blt_alpha
E_LIB buf2d_curve_bezier
E_LIB buf2d_convert_text_matrix
E_LIB buf2d_draw_text
E_LIB buf2d_crop_color
E_LIB buf2d_offset_h
E_LIB buf2d_flood_fill
E_LIB buf2d_set_pixel
E_LIB buf2d_get_pixel
E_LIB buf2d_flip_h
E_LIB buf2d_flip_v
E_LIB buf2d_filter_dither
E_LIB buf2d_vox_brush_create
E_LIB buf2d_vox_brush_delete
E_LIB buf2d_vox_obj_get_img_w_3g
E_LIB buf2d_vox_obj_get_img_h_3g
E_LIB buf2d_vox_obj_draw_1g
E_LIB buf2d_vox_obj_draw_3g
E_LIB buf2d_vox_obj_draw_3g_scaled
E_LIB buf2d_vox_obj_draw_pl
E_LIB buf2d_vox_obj_draw_pl_scaled
E_LIB buf2d_vox_obj_draw_3g_shadows
purge E_LIB

View File

@@ -1,20 +0,0 @@
align 4
import_buf2d:
macro E_LIB n
{
if n eq lib_init
dd strz_#n
else if defined sz_#n
n dd sz_#n
end if
}
include 'export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include 'export.inc'

View File

@@ -11,7 +11,7 @@ include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
include '../../../../dll.inc'
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db '<27><><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DES 21.05.25',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
caption db '<27><><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DES 05.03.13',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
struct FileInfoBlock
Function dd ?
@@ -112,13 +112,13 @@ align 4
still:
mcall SF_WAIT_EVENT
cmp al,EV_REDRAW
cmp al,1
jz red_win
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6 ;<3B><><EFBFBD><EFBFBD>
jne @f
jmp mouse
@@:
@@ -410,7 +410,52 @@ l_libs_start:
lib_4 l_libs lib_name_4, library_path, system_dir_4, import_box_lib
l_libs_end:
include '../../libs-dev/libimg/import.inc'
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
align 4
import_proclib: ;<3B><><EFBFBD><EFBFBD><E1A0AD> <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><E3A5AC> <20>㭪権
@@ -420,7 +465,57 @@ dd 0,0
aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
include '../../buf2d/import.inc'
align 4
import_buf2d:
init dd sz_init
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
;buf2d_line dd sz_buf2d_line
;buf2d_rect_by_size dd sz_buf2d_rect_by_size
;buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
;buf2d_circle dd sz_buf2d_circle
;buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
;buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
;buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
;buf2d_bit_blt dd sz_buf2d_bit_blt
;buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
;buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
;buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
;buf2d_crop_color dd sz_buf2d_crop_color
;buf2d_offset_h dd sz_buf2d_offset_h
;buf2d_flood_fill dd sz_buf2d_flood_fill
;buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
;sz_buf2d_line db 'buf2d_line',0
;sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
;sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
;sz_buf2d_circle db 'buf2d_circle',0
;sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
;sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
;sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
;sz_buf2d_bit_blt db 'buf2d_bit_blt',0
;sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
;sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
;sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
;sz_buf2d_crop_color db 'buf2d_crop_color',0
;sz_buf2d_offset_h db 'buf2d_offset_h',0
;sz_buf2d_flood_fill db 'buf2d_flood_fill',0
;sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_des: ;<3B><><EFBFBD><EFBFBD><E1A0AD> <20><><EFBFBD><E1AFAE><EFBFBD><EFBFBD><EFBFBD><E3A5AC> <20>㭪権
@@ -430,7 +525,22 @@ dd 0,0
sz_des_encryption db 'des_encryption',0
sz_des_decryption db 'des_decryption',0
include '../../box_lib/import.inc'
align 4
import_box_lib:
;dd sz_init1
edit_box_draw dd sz_edit_box_draw
edit_box_key dd sz_edit_box_key
edit_box_mouse dd sz_edit_box_mouse
;edit_box_set_text dd sz_edit_box_set_text
dd 0,0
;sz_init1 db 'lib_init',0
sz_edit_box_draw db 'edit_box_draw',0
sz_edit_box_key db 'edit_box_key',0
sz_edit_box_mouse db 'edit_box_mouse',0
;sz_edit_box_set_text db 'edit_box_set_text',0
mouse_dd dd 0x0
align 4
buf_0: dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
@@ -454,13 +564,12 @@ buf_1:
edit1 edit_box 58, 140,8, 0xffffff, 0xff, 0x80ff, 0, 0x8000, 8, txt_key, mouse_dd, ed_focus+ed_always_focus,8,8
txt_openfile db '<27><><EFBFBD><EFBFBD><E0AEA9><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E0AEA2><EFBFBD><EFBFBD>.',0
txt_buf rb 80
txt_key db 'des_0123',0
mem_key rb 120
align 16
i_end:
txt_buf rb 80
mem_key rb 120
mouse_dd rd 1
procinfo process_information
sc system_colors
rb 2048

View File

@@ -1,34 +0,0 @@
;
; Export functions
;
E_LIB lib_init
E_LIB version
E_LIB img_is_img
E_LIB img_info
E_LIB img_from_file
E_LIB img_to_file
E_LIB img_from_rgb
E_LIB img_to_rgb
E_LIB img_to_rgb2
E_LIB img_decode
E_LIB img_encode ;supported formats: PNG 24 32, BMP 24 32, PNM 1 8g 24
E_LIB img_create
E_LIB img_destroy
E_LIB img_destroy_layer
E_LIB img_count
E_LIB img_lock_bits
E_LIB img_unlock_bits
E_LIB img_flip
E_LIB img_flip_layer
E_LIB img_rotate
E_LIB img_rotate_layer
E_LIB img_draw
E_LIB img_scale
E_LIB img_get_scaled_size
E_LIB img_convert
E_LIB img_blend
E_LIB img_resize_data
E_LIB img_formats_table
purge E_LIB

View File

@@ -1,20 +0,0 @@
align 4
import_libimg:
macro E_LIB n
{
if n eq lib_init
dd strz_#n
else if defined sz_#n
n dd sz_#n
end if
}
include 'export.inc'
dd 0,0
macro E_LIB n
{
if used n
sz_#n db `n,0
end if
}
include 'export.inc'

View File

@@ -1,6 +0,0 @@
# SPDX-FileCopyrightText: 2025 iyzsong@envs.net
#
# SPDX-License-Identifier: MPL-2.0
zig-out
.zig-cache

View File

@@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@@ -1,17 +0,0 @@
// SPDX-FileCopyrightText: 2025 iyzsong@envs.net
//
// SPDX-License-Identifier: MPL-2.0
Uxn/Varvara emulator for Kolibri OS
Based on https://github.com/chmod222/zuxn
compile: zig build --release=fast
result: zig-out/bin/uxn
run: uxn SOME.rom
control:
Up/Down/Left/Right
Ctrl/Shift/Alt/Home
F1: change scale (1x, 2x, 3x)
TODO: file device, audio latency, open dialog?

View File

@@ -1,36 +0,0 @@
// SPDX-FileCopyrightText: 2025 iyzsong@envs.net
//
// SPDX-License-Identifier: MPL-2.0
const std = @import("std");
pub fn build(b: *std.Build) void {
const target_query = std.Target.Query{
.cpu_arch = std.Target.Cpu.Arch.x86,
.os_tag = std.Target.Os.Tag.freestanding,
.abi = std.Target.Abi.none,
.cpu_model = std.Target.Query.CpuModel{ .explicit = &std.Target.x86.cpu.i586 },
};
const target = b.resolveTargetQuery(target_query);
const optimize = b.standardOptimizeOption(.{});
const zuxn = b.dependency("zuxn", .{
.target = target,
.optimize = optimize,
});
const elf = b.addExecutable(.{
.name = "uxn.elf",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
.unwind_tables = .none,
});
elf.root_module.addImport("uxn-core", zuxn.module("uxn-core"));
elf.root_module.addImport("uxn-varvara", zuxn.module("uxn-varvara"));
elf.setLinkerScript(b.path("src/linker.ld"));
const bin = elf.addObjCopy(.{
.format = .bin,
});
const install_bin = b.addInstallBinFile(bin.getOutput(), "uxn");
b.getInstallStep().dependOn(&install_bin.step);
b.installArtifact(elf);
}

View File

@@ -1,22 +0,0 @@
// SPDX-FileCopyrightText: 2025 iyzsong@envs.net
//
// SPDX-License-Identifier: MPL-2.0
.{
.name = .uxn_kolibrios,
.version = "0.0.0",
.fingerprint = 0x3aef20f25c0a0218,
.minimum_zig_version = "0.14.0",
.dependencies = .{
.zuxn = .{
.url = "git+https://github.com/chmod222/zuxn.git#fc3a76724fa87dd08039438b56fc326ac3d51e4d",
.hash = "zuxn-0.0.1-XnoOpbqsAgD-fU6rv_AoLffA1utIzXuae2cmnHj6SzE6",
},
},
.paths = .{
"build.zig",
"build.zig.zon",
"src",
"LICENSE",
},
}

View File

@@ -1,522 +0,0 @@
// SPDX-FileCopyrightText: 2025 iyzsong@envs.net
//
// SPDX-License-Identifier: MPL-2.0
const std = @import("std");
pub const SYS = enum(i32) {
terminate_process = -1,
create_window = 0,
put_pixel = 1,
get_key = 2,
get_sys_time = 3,
draw_text = 4,
sleep = 5,
put_image = 7,
define_button = 8,
thread_info = 9,
wait_event = 10,
check_event = 11,
redraw = 12,
draw_rect = 13,
get_screen_size = 14,
get_button = 17,
system = 18,
screen_put_image = 25,
system_get = 26,
get_sys_date = 29,
mouse_get = 37,
set_events_mask = 40,
style_settings = 48,
create_thread = 51,
board = 63,
keyboard = 66,
change_window = 67,
sys_misc = 68,
file = 70,
blitter = 73,
};
pub const Event = enum(u32) {
none = 0,
redraw = 1,
key = 2,
button = 3,
background = 5,
mouse = 6,
ipc = 7,
};
pub inline fn syscall0(number: SYS) u32 {
return asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (@intFromEnum(number)),
);
}
pub inline fn syscall1(number: SYS, arg1: u32) u32 {
return asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (@intFromEnum(number)),
[arg1] "{ebx}" (arg1),
);
}
pub inline fn syscall2(number: SYS, arg1: u32, arg2: u32) u32 {
return asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (@intFromEnum(number)),
[arg1] "{ebx}" (arg1),
[arg2] "{ecx}" (arg2),
);
}
pub inline fn syscall3(number: SYS, arg1: u32, arg2: u32, arg3: u32) u32 {
return asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (@intFromEnum(number)),
[arg1] "{ebx}" (arg1),
[arg2] "{ecx}" (arg2),
[arg3] "{edx}" (arg3),
);
}
pub inline fn syscall4(number: SYS, arg1: u32, arg2: u32, arg3: u32, arg4: u32) u32 {
return asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (@intFromEnum(number)),
[arg1] "{ebx}" (arg1),
[arg2] "{ecx}" (arg2),
[arg3] "{edx}" (arg3),
[arg4] "{esi}" (arg4),
);
}
pub inline fn syscall5(number: SYS, arg1: u32, arg2: u32, arg3: u32, arg4: u32, arg5: u32) u32 {
return asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (@intFromEnum(number)),
[arg1] "{ebx}" (arg1),
[arg2] "{ecx}" (arg2),
[arg3] "{edx}" (arg3),
[arg4] "{esi}" (arg4),
[arg5] "{edi}" (arg5),
);
}
pub fn terminateProcess() noreturn {
_ = syscall0(SYS.terminate_process);
unreachable;
}
pub const WindowFlags = struct {
skinned: bool = true,
fixed: bool = true,
no_title: bool = false,
relative_coordinates: bool = false,
no_fill: bool = false,
unmovable: bool = false,
};
pub fn createWindow(x: u16, y: u16, width: u16, height: u16, bgcolor: u24, flags: WindowFlags, title: [*:0]const u8) void {
var f1: u32 = 0x00000000;
if (flags.no_fill)
f1 |= 0x40000000;
if (flags.relative_coordinates)
f1 |= 0x20000000;
if (!flags.no_title)
f1 |= 0x10000000;
if (flags.skinned) {
if (flags.fixed) {
f1 |= 0x04000000;
} else {
f1 |= 0x03000000;
}
} else {
f1 |= 0x01000000;
}
var f2: u32 = 0x00000000;
if (flags.unmovable)
f2 = 0x01000000;
_ = syscall5(SYS.create_window, @as(u32, x) * 0x10000 + width, @as(u32, y) * 0x10000 + height, f1 | @as(u32, bgcolor), f2 | @as(u32, bgcolor), @intFromPtr(title));
}
pub fn putPixel(x: u16, y: u16, color: u24) void {
_ = syscall3(SYS.put_pixel, x, y, color);
}
pub fn invertPixel(x: u16, y: u16) void {
_ = syscall3(SYS.put_pixel, x, y, 0x01000000);
}
pub const Key = packed struct(u32) {
_unused: u8 = 0,
key: u8 = 0,
scancode: u8 = 0,
empty: u8 = 1,
pub fn pressed(self: *const Key) bool {
return self.key & 0x80 > 0;
}
};
pub fn getKey() Key {
return @bitCast(syscall0(SYS.get_key));
}
pub fn getSysTime() u24 {
return @intCast(syscall0(SYS.get_sys_time));
}
pub fn getButton() u32 {
return syscall0(SYS.get_button);
}
pub fn terminateThreadId(id: u32) void {
_ = syscall2(SYS.system, 18, id);
}
pub fn drawText(x: u16, y: u16, color: u24, text: [*:0]const u8) void {
_ = syscall5(SYS.draw_text, @as(u32, x) * 0x10000 + y, 0x80000000 | @as(u32, color), @intFromPtr(text), 0, 0);
}
pub fn sleep(centisecond: u32) void {
_ = syscall1(SYS.sleep, centisecond);
}
pub fn beginDraw() void {
_ = syscall1(SYS.redraw, 1);
}
pub fn endDraw() void {
_ = syscall1(SYS.redraw, 2);
}
pub fn putImage(image: [*]const u8, width: u16, height: u16, x: u16, y: u16) void {
_ = syscall3(SYS.put_image, @intFromPtr(image), @as(u32, width) * 0x10000 + height, @as(u32, x) * 0x10000 + y);
}
pub fn drawRect(x: u16, y: u16, width: u16, height: u16, color: u24) void {
_ = syscall3(SYS.draw_rect, @as(u32, x) * 0x10000 + width, @as(u32, y) * 0x10000 + height, color);
}
pub fn getScreenSize() packed struct(u32) { height: u16, width: u16 } {
return @bitCast(syscall0(SYS.get_screen_size));
}
pub fn waitEvent() Event {
return @enumFromInt(syscall0(SYS.wait_event));
}
pub fn checkEvent() Event {
return @enumFromInt(syscall0(SYS.check_event));
}
pub fn createThread(entry: *const fn () void, stack: []u8) u32 {
return syscall3(SYS.create_thread, 1, @intFromPtr(entry), @intFromPtr(stack.ptr) + stack.len);
}
pub fn debugWrite(byte: u8) void {
_ = syscall2(SYS.board, 1, byte);
}
pub fn debugWriteText(bytes: []const u8) void {
for (bytes) |byte| {
debugWrite(byte);
}
}
pub const EventsMask = packed struct(u32) {
redraw: bool = true, // 0
key: bool = true,
button: bool = true,
_reserved: bool = false,
background: bool = false,
mouse: bool = false,
ipc: bool = false,
network: bool = false,
debug: bool = false,
_unused: u23 = 0,
};
pub fn setEventsMask(mask: EventsMask) EventsMask {
return @bitCast(syscall1(SYS.set_events_mask, @bitCast(mask)));
}
pub fn getSkinHeight() u16 {
return @intCast(syscall1(SYS.style_settings, 4));
}
pub fn screenPutImage(image: [*]const u32, width: u16, height: u16, x: u16, y: u16) void {
_ = syscall3(SYS.screen_put_image, @intFromPtr(image), @as(u32, width) * 0x10000 + height, @as(u32, x) * 0x10000 + y);
}
pub fn systemGetTimeCount() u32 {
return syscall1(SYS.system_get, 9);
}
pub fn getSysDate() u24 {
return @intCast(syscall0(SYS.get_sys_date));
}
pub fn mouseGetScreenPosition() packed struct(u32) { y: u16, x: u16 } {
return @bitCast(syscall1(SYS.mouse_get, 0));
}
pub fn mouseGetWindowPosition() packed struct(u32) { y: u16, x: u16 } {
return @bitCast(syscall1(SYS.mouse_get, 1));
}
pub fn loadCursorIndirect(image: *const [32 * 32]u32, spotx: u5, spoty: u5) u32 {
return syscall3(SYS.mouse_get, 4, @intFromPtr(image), 0x0002 | (@as(u32, spotx) << 24) | (@as(u32, spoty) << 16));
}
pub fn setCursor(cursor: u32) u32 {
return syscall2(SYS.mouse_get, 5, cursor);
}
pub const MouseEvents = packed struct(u32) {
left_hold: bool = false,
right_hold: bool = false,
middle_hold: bool = false,
button4_hold: bool = false,
button5_hold: bool = false,
_unused0: u3 = 0,
left_pressed: bool = false,
right_pressed: bool = false,
middle_pressed: bool = false,
_unused1: u4 = 0,
vertical_scroll: bool = false,
left_released: bool = false,
right_released: bool = false,
middle_released: bool = false,
_unused2: u4 = 0,
horizontal_scroll: bool = false,
left_double_clicked: bool = false,
_unused3: u7 = 0,
};
pub fn mouseGetEvents() MouseEvents {
return @bitCast(syscall1(SYS.mouse_get, 3));
}
pub fn heapInit() u32 {
return syscall1(SYS.sys_misc, 11);
}
pub fn memAlloc(size: u32) *anyopaque {
return @ptrFromInt(syscall2(SYS.sys_misc, 12, size));
}
pub fn memFree(ptr: *anyopaque) void {
_ = syscall2(SYS.sys_misc, 13, @intFromPtr(ptr));
}
pub fn memRealloc(size: u32, ptr: *anyopaque) *anyopaque {
return @ptrFromInt(syscall3(SYS.sys_misc, 20, size, @intFromPtr(ptr)));
}
fn alloc(ctx: *anyopaque, len: usize, alignment: std.mem.Alignment, ret_addr: usize) ?[*]u8 {
_ = ctx;
_ = alignment;
_ = ret_addr;
return @ptrCast(memAlloc(len));
}
fn free(ctx: *anyopaque, memory: []u8, alignment: std.mem.Alignment, ret_addr: usize) void {
_ = ctx;
_ = alignment;
_ = ret_addr;
memFree(@ptrCast(memory.ptr));
}
fn resize(ctx: *anyopaque, memory: []u8, alignment: std.mem.Alignment, new_len: usize, ret_addr: usize) bool {
_ = ctx;
_ = alignment;
_ = ret_addr;
_ = memRealloc(new_len, @ptrCast(memory.ptr));
return true;
}
fn remap(ctx: *anyopaque, memory: []u8, alignment: std.mem.Alignment, new_len: usize, ret_addr: usize) ?[*]u8 {
_ = ctx;
_ = memory;
_ = alignment;
_ = new_len;
_ = ret_addr;
return null;
}
pub const allocator: std.mem.Allocator = .{
.ptr = undefined,
.vtable = &.{
.alloc = alloc,
.free = free,
.resize = resize,
.remap = remap,
},
};
pub fn loadDriver(name: [*:0]const u8) u32 {
return syscall2(SYS.sys_misc, 16, @intFromPtr(name));
}
pub fn controlDriver(drv: u32, func: u32, in: ?[]const u32, out: ?[]const *anyopaque) u32 {
const ioctl: packed struct(u192) {
drv: u32,
func: u32,
inptr: u32,
insize: u32,
outptr: u32,
outsize: u32,
} = .{
.drv = drv,
.func = func,
.inptr = if (in) |v| @intFromPtr(v.ptr) else 0,
.insize = if (in) |v| v.len * 4 else 0,
.outptr = if (out) |v| @intFromPtr(v.ptr) else 0,
.outsize = if (out) |v| v.len * 4 else 0,
};
return syscall2(SYS.sys_misc, 17, @intFromPtr(&ioctl));
}
pub const Signal = packed struct(u192) {
kind: u32,
data0: u32,
data1: u32,
data2: u32,
data3: u32,
data4: u32,
};
pub fn waitSignal(sig: *Signal) void {
_ = syscall2(SYS.sys_misc, 14, @intFromPtr(sig));
}
pub const Sound = struct {
drv: u32,
pub const Buffer = struct {
drv: u32,
handle: u32,
pub fn play(self: *const Buffer, flags: u32) void {
_ = controlDriver(self.drv, 10, &.{ self.handle, flags }, null);
}
pub fn set(self: *const Buffer, src: []u8, offset: u32) void {
_ = controlDriver(self.drv, 8, &.{ self.handle, @intFromPtr(src.ptr), offset, src.len }, null);
}
};
pub fn init() Sound {
return .{
.drv = loadDriver("INFINITY"),
};
}
pub fn createBuffer(self: *const Sound, format: u32, size: u32) Buffer {
var ret: u32 = 0;
_ = controlDriver(self.drv, 1, &.{ format, size }, &.{&ret});
return .{
.drv = self.drv,
.handle = ret,
};
}
};
pub const InputMode = enum(u32) {
normal = 0,
scancodes = 1,
};
pub fn setInputMode(mode: InputMode) void {
_ = syscall2(SYS.keyboard, 1, @intFromEnum(mode));
}
pub fn changeWindow(x: u32, y: u32, width: u32, height: u32) void {
_ = syscall4(SYS.change_window, x, y, width, height);
}
pub const ControlKeys = packed struct(u32) {
left_shift: bool,
right_shift: bool,
left_ctrl: bool,
right_ctrl: bool,
left_alt: bool,
right_alt: bool,
caps_lock: bool,
num_lock: bool,
scroll_lock: bool,
left_win: bool,
right_win: bool,
_unused: u21,
};
pub fn getControlKeys() ControlKeys {
return @bitCast(syscall1(SYS.keyboard, 3));
}
pub const File = struct {
pathname: [*:0]const u8,
offset: u64 = 0,
pub fn reader(file: *File) std.io.GenericReader(*File, anyerror, struct {
fn read(context: *File, buffer: []u8) !usize {
const info: packed struct(u200) {
subfn: u32 = 0,
offset: u64,
size: u32,
buffer: *u8,
path0: u8 = 0,
pathptr: *const u8,
} = .{
.offset = context.offset,
.size = buffer.len,
.buffer = @ptrCast(buffer),
.pathptr = @ptrCast(context.pathname),
};
const err = asm volatile ("int $0x40"
: [ret] "={eax}" (-> u32),
: [number] "{eax}" (SYS.file),
[info] "{ebx}" (&info),
);
const size = asm volatile (""
: [ret] "={ebx}" (-> u32),
);
context.offset += size;
return switch (err) {
0 => size,
10 => error.AccessDenied,
6 => size,
else => error.Unexpected,
};
}
}.read) {
return .{ .context = file };
}
};
pub const BlitterFlags = packed struct(u32) {
rop: u4 = 0,
background: bool = false,
transparent: bool = false,
reserved1: u23 = 0,
client_relative: bool = true,
reserved2: u2 = 0,
};
pub fn blitter(dstx: u32, dsty: u32, dstw: u32, dsth: u32, srcx: u32, srcy: u32, srcw: u32, srch: u32, src: *const u8, pitch: u32, flags: BlitterFlags) void {
_ = syscall2(SYS.blitter, @bitCast(flags), @intFromPtr(&[_]u32{ dstx, dsty, dstw, dsth, srcx, srcy, srcw, srch, @intFromPtr(src), pitch }));
}
pub const DebugWriter = std.io.GenericWriter(void, anyerror, struct {
fn write(context: void, bytes: []const u8) !usize {
_ = context;
debugWriteText(bytes);
return bytes.len;
}
}.write);
pub const debug_writer: DebugWriter = .{ .context = {} };

View File

@@ -1,42 +0,0 @@
/*
* SPDX-FileCopyrightText: 2025 iyzsong@envs.net
*
* SPDX-License-Identifier: MPL-2.0
*/
SECTIONS
{
.text 0x00000000 :
{
/* MENUET01 header */
LONG(0x554e454d);
LONG(0x31305445);
LONG(1);
LONG(_start);
LONG(_image_end);
LONG(_memory_end);
LONG(_stack_top);
LONG(_cmdline);
LONG(0);
*(.text)
*(.text.*)
}
.rodata : ALIGN(8)
{
*(.rodata)
*(.rodata.*)
}
.data : ALIGN(8)
{
*(.data)
}
_image_end = .;
.bss : ALIGN(8)
{
*(.bss)
. = . + 4K;
_stack_top = .;
}
_memory_end = .;
}

View File

@@ -1,361 +0,0 @@
// SPDX-FileCopyrightText: 2025 iyzsong@envs.net
//
// SPDX-License-Identifier: MPL-2.0
const std = @import("std");
const kos = @import("kolibri.zig");
const uxn = @import("uxn-core");
const varvara = @import("uxn-varvara");
const allocator = kos.allocator;
export var _cmdline: [1024]u8 = undefined;
pub const std_options: std.Options = .{
.log_level = .info,
.logFn = struct {
fn log(comptime level: std.log.Level, comptime scope: @Type(.enum_literal), comptime format: []const u8, args: anytype) void {
_ = level;
_ = scope;
kos.debug_writer.print(format, args) catch return;
}
}.log,
};
const VarvaraDefault = varvara.VarvaraSystem(kos.DebugWriter, kos.DebugWriter);
const emu = struct {
var cpu: uxn.Cpu = undefined;
var sys: VarvaraDefault = undefined;
var rom: *[0x10000]u8 = undefined;
var pixels: []u8 = undefined;
var screen_width: u32 = undefined;
var screen_height: u32 = undefined;
var null_cursor: u32 = undefined;
var hide_cursor: bool = false;
var audio_thread: ?u32 = null;
var scale: u4 = 1;
fn init(rompath: [*:0]const u8) !void {
const screen = &emu.sys.screen_device;
var file = kos.File{ .pathname = rompath };
emu.rom = try uxn.loadRom(allocator, file.reader());
emu.cpu = uxn.Cpu.init(emu.rom);
emu.sys = try VarvaraDefault.init(allocator, kos.debug_writer, kos.debug_writer);
emu.cpu.device_intercept = struct {
fn bcd8(x: u8) u8 {
return (x & 0xf) + 10 * ((x & 0xf0) >> 4);
}
pub fn intercept(self: *uxn.Cpu, addr: u8, kind: uxn.Cpu.InterceptKind, data: ?*anyopaque) !void {
_ = data;
const port: u4 = @truncate(addr & 0x0f);
if (audio_thread == null and addr >= 0x30 and addr < 0x70) {
audio_thread = kos.createThread(&audio, allocator.alloc(u8, 32 * 1024) catch unreachable);
}
switch (addr >> 4) {
0xa, 0xb => {
if (kind != .output)
return;
// TODO: file device
},
0xc => {
if (kind != .input)
return;
const dev = &sys.datetime_device;
const date = kos.getSysDate();
const time = kos.getSysTime();
switch (port) {
0x0, 0x1 => {
const year: u8 = bcd8(@truncate(date & 0xff));
dev.storePort(u16, &cpu, 0x0, @as(u16, 2000) + bcd8(year));
},
0x02 => {
const month: u8 = bcd8(@truncate((date & 0xff00) >> 8));
dev.storePort(u8, &cpu, port, month);
},
0x03 => {
const day: u8 = bcd8(@truncate((date & 0xff0000) >> 16));
dev.storePort(u8, &cpu, port, day);
},
0x04 => {
const hour: u8 = bcd8(@truncate(time & 0xff));
dev.storePort(u8, &cpu, port, hour);
},
0x05 => {
const minute: u8 = bcd8(@truncate((time & 0xff00) >> 8));
dev.storePort(u8, &cpu, port, minute);
},
0x06 => {
const second: u8 = bcd8(@truncate((time & 0xff0000) >> 16));
dev.storePort(u8, &cpu, port, second);
},
else => {},
}
},
else => try emu.sys.intercept(self, addr, kind),
}
}
}.intercept;
emu.cpu.output_intercepts = varvara.full_intercepts.output;
emu.cpu.input_intercepts = varvara.full_intercepts.input;
try emu.cpu.evaluateVector(0x0100);
screen_width = screen.width * emu.scale;
screen_height = screen.height * emu.scale;
emu.pixels = try allocator.alloc(u8, @as(usize, 4) * screen_width * screen_height);
}
fn exit() void {
if (audio_thread) |tid| {
kos.terminateThreadId(tid);
}
kos.terminateProcess();
}
fn audio() void {
var samples: [8192]i16 = undefined;
var sig: kos.Signal = undefined;
const buf = kos.Sound.init().createBuffer(3 | 0x10000000, 0);
buf.play(0);
while (true) {
kos.waitSignal(&sig);
if (sig.kind != 0xFF000001) continue;
@memset(&samples, 0);
for (0..samples.len / 512) |i| {
const w = samples[i * 512 .. (i + 1) * 512];
for (&sys.audio_devices) |*poly| {
if (poly.duration <= 0) {
poly.evaluateFinishVector(&cpu) catch unreachable;
}
poly.updateDuration();
poly.renderAudio(w);
}
}
for (0..samples.len) |i| {
samples[i] <<= 6;
}
buf.set(@ptrCast(&samples), sig.data2);
}
}
fn update() !void {
const screen = &sys.screen_device;
const colors = &sys.system_device.colors;
if (sys.system_device.exit_code) |_| {
exit();
}
if (screen_width != screen.width * scale or screen_height != screen.height * scale) {
const skin_height = kos.getSkinHeight();
allocator.free(emu.pixels);
screen_width = screen.width * scale;
screen_height = screen.height * scale;
emu.pixels = try allocator.alloc(u8, @as(usize, 4) * screen_width * screen_height);
kos.changeWindow(100, 100, screen_width + 9, screen_height + skin_height + 4);
}
try screen.evaluateFrame(&cpu);
if (screen.dirty_region) |region| {
for (region.y0..region.y1) |y| {
for (region.x0..region.x1) |x| {
const idx = y * screen.width + x;
const pal = (@as(u4, screen.foreground[idx]) << 2) | screen.background[idx];
const color = colors[if ((pal >> 2) > 0) (pal >> 2) else (pal & 0x3)];
for (0..scale) |sy| {
for (0..scale) |sx| {
pixels[4 * ((y * scale + sy) * screen.width * scale + (x * scale + sx)) + 2] = color.r;
pixels[4 * ((y * scale + sy) * screen.width * scale + (x * scale + sx)) + 1] = color.g;
pixels[4 * ((y * scale + sy) * screen.width * scale + (x * scale + sx)) + 0] = color.b;
}
}
}
}
const ix = region.x0 * scale;
const iy = region.y0 * scale;
const iw = (region.x1 - region.x0) * scale;
const ih = (region.y1 - region.y0) * scale;
kos.blitter(ix, iy, iw, ih, ix, iy, iw, ih, @ptrCast(emu.pixels.ptr), screen.width * scale * 4, .{});
screen.dirty_region = null;
}
}
fn changeScale() void {
const screen = &sys.screen_device;
scale = switch (scale) {
1 => 2,
2 => 3,
3 => 1,
else => 1,
};
screen.forceRedraw();
}
};
export fn _start() noreturn {
const cursor: [32 * 32]u32 = .{0} ** (32 * 32);
var counter: u32 = 0;
var last_tick = kos.systemGetTimeCount();
_ = kos.heapInit();
_ = kos.setEventsMask(.{ .mouse = true });
kos.setInputMode(.scancodes);
emu.null_cursor = kos.loadCursorIndirect(&cursor, 0, 0);
emu.init(@ptrCast(&_cmdline)) catch unreachable;
const screen = &emu.sys.screen_device;
const controller = &emu.sys.controller_device;
const callbacks = struct {
fn redraw() void {
const skin_height = kos.getSkinHeight();
kos.beginDraw();
kos.createWindow(300, 300, screen.width * emu.scale + 9, screen.height * emu.scale + skin_height + 4, 0x000000, .{ .skinned = true, .no_fill = true, .relative_coordinates = true }, "UXN");
kos.endDraw();
}
fn key() void {
const symtab: [0x80]u8 = .{
// 0x0*
0, 27, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '=', 8, '\t',
// 0x1*
'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', '[', ']', '\r', 0, 'a', 's',
// 0x2*
'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', '\'', '`', 0, '\\', 'z', 'x', 'c', 'v',
// 0x3*
'b', 'n', 'm', ',', '.', '/', 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0,
// 0x00* + SHIFT
0, 27, '!', '@', '#', '$', '%', '^', '&', '*', '(', ')', '_', '+', 8, '\t',
// 0x10* + SHIFT
'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', 'O', 'P', '{', '}', '\r', 0, 'A', 'S',
// 0x20* + SHIFT
'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', '"', '~', 0, '|', 'Z', 'X', 'C', 'V',
// 0x30* + SHIFT,
'B', 'N', 'M', '<', '>', '?', 0, 0, 0, ' ', 0, 0, 0, 0, 0, 0,
};
const scancode1 = kos.getKey().key;
const input: ?union(enum) {
button: struct {
flags: varvara.controller.ButtonFlags,
pressed: bool,
},
key: u8,
} = switch (scancode1) {
0xe0 => brk: {
const scancode2 = kos.getKey().key;
break :brk switch (scancode2) {
0x1d => .{ .button = .{ .flags = .{ .ctrl = true }, .pressed = true } },
0x9d => .{ .button = .{ .flags = .{ .ctrl = true }, .pressed = false } },
0x38 => .{ .button = .{ .flags = .{ .alt = true }, .pressed = true } },
0xb8 => .{ .button = .{ .flags = .{ .alt = true }, .pressed = false } },
0x47 => .{ .button = .{ .flags = .{ .start = true }, .pressed = true } },
0xc7 => .{ .button = .{ .flags = .{ .start = true }, .pressed = false } },
0x48 => .{ .button = .{ .flags = .{ .up = true }, .pressed = true } },
0xc8 => .{ .button = .{ .flags = .{ .up = true }, .pressed = false } },
0x50 => .{ .button = .{ .flags = .{ .down = true }, .pressed = true } },
0xd0 => .{ .button = .{ .flags = .{ .down = true }, .pressed = false } },
0x4b => .{ .button = .{ .flags = .{ .left = true }, .pressed = true } },
0xcb => .{ .button = .{ .flags = .{ .left = true }, .pressed = false } },
0x4d => .{ .button = .{ .flags = .{ .right = true }, .pressed = true } },
0xcd => .{ .button = .{ .flags = .{ .right = true }, .pressed = false } },
else => null,
};
},
0x3b => brk: {
emu.changeScale();
break :brk null;
},
0x1d => .{ .button = .{ .flags = .{ .ctrl = true }, .pressed = true } },
0x9d => .{ .button = .{ .flags = .{ .ctrl = true }, .pressed = false } },
0x38 => .{ .button = .{ .flags = .{ .alt = true }, .pressed = true } },
0xb8 => .{ .button = .{ .flags = .{ .alt = true }, .pressed = false } },
0x2a, 0x36 => .{ .button = .{ .flags = .{ .shift = true }, .pressed = true } },
0xaa, 0xb6 => .{ .button = .{ .flags = .{ .shift = true }, .pressed = false } },
else => brk: {
if (scancode1 > 0x40) {
break :brk null;
}
const ctrls = kos.getControlKeys();
const k = if (ctrls.left_shift or ctrls.right_shift) symtab[scancode1 + 0x40] else symtab[scancode1];
break :brk if (k > 0) .{ .key = k } else null;
},
};
if (input) |v| {
switch (v) {
.button => {
if (v.button.pressed) {
controller.pressButtons(&emu.cpu, v.button.flags, 0) catch unreachable;
} else {
controller.releaseButtons(&emu.cpu, v.button.flags, 0) catch unreachable;
}
},
.key => {
controller.pressKey(&emu.cpu, v.key) catch unreachable;
},
}
}
}
fn button() void {
const btn = kos.getButton();
if (btn >> 8 == 1)
emu.exit();
}
fn mouse() void {
const dev = &emu.sys.mouse_device;
const pos = kos.mouseGetWindowPosition();
const events = kos.mouseGetEvents();
const mouse_pressed: varvara.mouse.ButtonFlags = .{
.left = events.left_pressed,
.middle = events.middle_pressed,
.right = events.right_pressed,
._unused = 0,
};
const mouse_released: varvara.mouse.ButtonFlags = .{
.left = events.left_released,
.middle = events.middle_released,
.right = events.right_released,
._unused = 0,
};
if (emu.hide_cursor and pos.y > emu.screen_height) {
_ = kos.setCursor(0);
emu.hide_cursor = false;
}
if (!emu.hide_cursor and pos.y < emu.screen_height) {
_ = kos.setCursor(emu.null_cursor);
emu.hide_cursor = true;
}
dev.updatePosition(&emu.cpu, pos.x / emu.scale, pos.y / emu.scale) catch unreachable;
if (@as(u8, @bitCast(mouse_pressed)) > 0) {
dev.pressButtons(&emu.cpu, mouse_pressed) catch unreachable;
}
if (@as(u8, @bitCast(mouse_released)) > 0) {
dev.releaseButtons(&emu.cpu, mouse_released) catch unreachable;
}
}
};
callbacks.redraw();
while (true) {
while (true) {
const event = kos.checkEvent();
switch (event) {
.none => break,
.redraw => callbacks.redraw(),
.key => callbacks.key(),
.button => callbacks.button(),
.mouse => callbacks.mouse(),
else => {},
}
}
const tick = kos.systemGetTimeCount();
counter += (tick - last_tick) * 3;
last_tick = tick;
if (counter > 5) {
counter -= 5;
emu.update() catch unreachable;
} else {
kos.sleep(1);
}
}
}

View File

@@ -23,9 +23,6 @@ library_fun_memory_free equ mem_free
library_fun_memory_realloc equ mem_realloc
library_fun_dll_load equ dll_load
align 4
strz_lib_init db 'lib_init',0
align 4
arrea_xx dd 0
file_name db '/sys/@notify',0
@@ -217,7 +214,7 @@ end if
jmp i_error
align 4
i_begin:
import_some_library myimport
import_boxlib myimport
test eax,eax
jz i_exit
i_error:
@@ -237,13 +234,13 @@ macro load_library library_name__, library_path__, system_path__, myimport, poin
local i_begin
local i_error
local i_exit
push ebx
if point_dir_name__ eq
copy_path library_name__, [32], library_path__,0
else
;the macros making way /current path a program/ + name system library
copy_path library_name__, [32], library_path__,point_dir_name__
end if
push ebx
mcall SF_SYS_MISC,SSF_LOAD_DLL,library_path__ ; load of alternative
test eax,eax
jnz i_begin
@@ -254,7 +251,7 @@ end if
jmp i_error
align 4
i_begin:
import_some_library myimport
import_boxlib myimport
test eax,eax
jz i_exit
i_error:
@@ -312,7 +309,7 @@ align 4
align 4
end_steep:
mov adr_load_lib,eax ;save adr lib in memory
import_some_library my_import
import_boxlib my_import
test eax,eax
jz cycle0n
or status_lib,2 ; status of code - enable error - import error
@@ -390,7 +387,7 @@ align 4
align 4
end_steep:
mov adr_load_lib,eax ;save adr lib in memory
import_some_library my_import
import_boxlib my_import
test eax,eax
jz cycle0n
or status_lib,2 ; status of code - enable error - import error
@@ -454,7 +451,7 @@ pop ebx eax
;output:
; eax - <20>᫨ 㤠筮 <20><> 0 <20><><EFBFBD><><E3AAA0><EFBFBD> <20><> <20><><EFBFBD> <20>㭪樨 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><><E3A4A0><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E3A7A8>
; ebx - ࠧ<><E0A0A7><EFBFBD><E8A0A5><EFBFBD>
macro import_some_library myimport
macro import_boxlib myimport
{
local import_loop
local import_find

View File

@@ -1,7 +1,3 @@
; SPDX-License-Identifier: GPL-2.0-only
; ImgTransform - utility for creating textures from images
; Copyright (C) 2020-2025 KolibriOS team
use32
org 0
db 'MENUET01'
@@ -13,23 +9,23 @@ include '../../proc32.inc'
include '../../KOSfuncs.inc'
include '../../load_img.inc'
include '../../load_lib.mac'
include '../../develop/libraries/TinyGL/asm_fork/kosgl.inc'
include '../../develop/libraries/TinyGL/asm_fork/opengl_const.inc'
include '../../develop/libraries/TinyGL/asm_fork/zbuffer.inc'
include '../../develop/libraries/libs-dev/libimg/libimg.inc'
include '../../develop/info3ds/info_fun_float.inc'
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'Image transform 21.05.25',0
caption db 'Image transform 08.12.20',0 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
BUF_STRUCT_SIZE equ 21
buf2d_data equ dword[edi] ;image buffer data
buf2d_w equ dword[edi+8] ;buffer width
buf2d_h equ dword[edi+12] ;buffer height
buf2d_l equ word[edi+4] ;left space
buf2d_t equ word[edi+6] ;top space
buf2d_color equ dword[edi+16] ;buffer background color
buf2d_bits equ byte[edi+20] ;number of bits in 1 image pixel
buf2d_data equ dword[edi] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
buf2d_w equ dword[edi+8] ;<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_h equ dword[edi+12] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_l equ word[edi+4]
buf2d_t equ word[edi+6] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A2A5><EFBFBD>
buf2d_size_lt equ dword[edi+4] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1ABA5> <20> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_color equ dword[edi+16] ;<EFBFBD><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
buf2d_bits equ byte[edi+20] ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD> <20> 1-<2D> <20><><20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
NAV_WND_L equ 145
NAV_WND_T equ 1
@@ -92,13 +88,13 @@ still:
cmp eax,0
je timer_funct
cmp al,EV_REDRAW
cmp al,1
jz red_win
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
@@ -1432,9 +1428,56 @@ l_libs_start:
lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
lib_2 l_libs lib_name_2, library_path, system_dir_2, import_buf2d
lib_3 l_libs lib_name_3, library_path, system_dir_3, import_tinygl
lib_3 l_libs lib_name_3, library_path, system_dir_3, import_lib_tinygl
l_libs_end:
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
align 4
import_proclib:
OpenDialog_Init dd aOpenDialog_Init
@@ -1447,9 +1490,76 @@ dd 0,0
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
include '../../develop/libraries/libs-dev/libimg/import.inc'
include '../../develop/libraries/buf2d/import.inc'
include '../../develop/libraries/TinyGL/asm_fork/import.inc'
align 4
import_buf2d:
init dd sz_init
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
buf2d_get_pixel dd sz_buf2d_get_pixel
dd 0,0
sz_init db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
sz_buf2d_get_pixel db 'buf2d_get_pixel',0
align 4
import_lib_tinygl:
macro E_LIB n
{
n dd sz_#n
}
include '../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
dd 0,0
macro E_LIB n
{
sz_#n db `n,0
}
include '../../../programs/develop/libraries/TinyGL/asm_fork/export.inc'
align 4
buf_0: dd 0

View File

@@ -259,10 +259,99 @@ aOpenDialog_Init db 'OpenDialog_init',0
aOpenDialog_Start db 'OpenDialog_start',0
;aOpenDialog_Version db 'Version_OpenDialog',0
;---------------------------------------------------------------------
align 4
Box_lib_import:
;init_lib dd a_init
;version_lib dd a_version
Box_lib_import equ import_box_lib
include '../../develop/libraries/box_lib/import.inc'
include '../../develop/libraries/libs-dev/libimg/import.inc'
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
edit_box_set_text dd aEdit_box_set_text
;version_ed dd aVersion_ed
init_checkbox dd aInit_checkbox
check_box_draw dd aCheck_box_draw
check_box_mouse dd aCheck_box_mouse
;version_ch dd aVersion_ch
option_box_draw dd aOption_box_draw
option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op
PathShow_prepare dd sz_PathShow_prepare
PathShow_draw dd sz_PathShow_draw
;Version_path_show dd szVersion_path_show
dd 0,0
;a_init db 'lib_init',0
;a_version db 'version',0
aEdit_box_draw db 'edit_box_draw',0
aEdit_box_key db 'edit_box_key',0
aEdit_box_mouse db 'edit_box_mouse',0
aEdit_box_set_text db 'edit_box_set_text',0
;aVersion_ed db 'version_ed',0
aInit_checkbox db 'init_checkbox2',0
aCheck_box_draw db 'check_box_draw2',0
aCheck_box_mouse db 'check_box_mouse2',0
;aVersion_ch db 'version_ch2',0
aOption_box_draw db 'option_box_draw',0
aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0
sz_PathShow_prepare db 'PathShow_prepare',0
sz_PathShow_draw db 'PathShow_draw',0
;szVersion_path_show db 'version_PathShow',0
;---------------------------------------------------------------------
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
;---------------------------------------------------------------------
;width,left,top,color,shift_color,focus_border_color,\
; blur_border_color,text_color,max,text,mouse_variable,flags,size,pos

View File

@@ -140,13 +140,13 @@ still:
jmp still
@@:
cmp al,EV_REDRAW
cmp al,1
jz red_win
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
@@ -757,6 +757,52 @@ l_libs_start:
lib_4 l_libs lib_name_4, file_name, system_dir_4, import_libkmenu
l_libs_end:
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
align 4
import_proclib:
@@ -770,9 +816,110 @@ dd 0,0
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
;aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
include '../../develop/libraries/libs-dev/libimg/import.inc'
include '../../develop/libraries/buf2d/import.inc'
include '../../develop/libraries/box_lib/import.inc'
align 4
import_buf2d:
init dd sz_init
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_line_sm dd sz_buf2d_line_sm
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_flip_h dd sz_buf2d_flip_h
buf2d_flip_v dd sz_buf2d_flip_v
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_line_sm db 'buf2d_line_sm',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_flip_h db 'buf2d_flip_h',0
sz_buf2d_flip_v db 'buf2d_flip_v',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_box_lib:
dd sz_init1
init_checkbox dd sz_Init_checkbox
check_box_draw dd sz_Check_box_draw
check_box_mouse dd sz_Check_box_mouse
;version_ch dd sz_Version_ch
option_box_draw dd sz_Option_box_draw
option_box_mouse dd sz_Option_box_mouse
;version_op dd sz_Version_op
edit_box_draw dd sz_edit_box_draw
edit_box_key dd sz_edit_box_key
edit_box_mouse dd sz_edit_box_mouse
edit_box_set_text dd sz_edit_box_set_text
scrollbar_ver_draw dd sz_scrollbar_ver_draw
scrollbar_hor_draw dd sz_scrollbar_hor_draw
progressbar_draw dd sz_progressbar_draw
progressbar_progress dd sz_progressbar_progress
dd 0,0
sz_init1 db 'lib_init',0
sz_Init_checkbox db 'init_checkbox2',0
sz_Check_box_draw db 'check_box_draw2',0
sz_Check_box_mouse db 'check_box_mouse2',0
;sz_Version_ch db 'version_ch2',0
sz_Option_box_draw db 'option_box_draw',0
sz_Option_box_mouse db 'option_box_mouse',0
;sz_Version_op db 'version_op',0
sz_edit_box_draw db 'edit_box_draw',0
sz_edit_box_key db 'edit_box_key',0
sz_edit_box_mouse db 'edit_box_mouse',0
sz_edit_box_set_text db 'edit_box_set_text',0
sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
sz_progressbar_draw db 'progressbar_draw', 0
sz_progressbar_progress db 'progressbar_progress', 0
align 4
import_libkmenu:

View File

@@ -15,16 +15,16 @@ include 'cnc_editor.inc'
include '../../develop/info3ds/info_fun_float.inc'
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
caption db 'CNC editor 07.05.25',0 ;window signature
caption db 'CNC editor 23.05.19',0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
run_file_70 FileInfoBlock
offs_last_timer dd 0 ;<3B><><EFBFBD><E1ABA5><EFBFBD><EFBFBD><><E1A4A2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20>㭪樨 ⠩<><E2A0A9><EFBFBD><EFBFBD>
IMAGE_TOOLBAR_ICON_SIZE equ 16*16*3
image_data_toolbar dd 0 ;pointer to temporary memory, needed for image conversion
icon_tl_sys dd 0 ;pointer to memory for storing system icons
icon_toolbar dd 0 ;pointer to memory for storing object icons
image_data_toolbar dd 0 ;<EFBFBD><EFBFBD><EFBFBD> <20><> <20><EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD> <20><EFBFBD> <20><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
icon_tl_sys dd 0 ;<EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
icon_toolbar dd 0 ;<EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><EFBFBD><E0A0AD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ꥪ⮢
include 'wnd_point_coords.inc'
include 'wnd_scale.inc'
@@ -111,13 +111,13 @@ still:
jmp still
@@:
cmp al,EV_REDRAW
cmp al,1
jz red_win
cmp al,EV_KEY
cmp al,2
jz key
cmp al,EV_BUTTON
cmp al,3
jz button
cmp al,EV_MOUSE
cmp al,6
jne @f
mcall SF_THREAD_INFO,procinfo,-1
cmp ax,word[procinfo.window_stack_position]
@@ -360,7 +360,8 @@ pushad
cmp eax,dword[buf_0.h] ;ᬮ<>ਬ ࠧ<><E0A0A7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
jne @f
cmp ebx,dword[buf_0.w]
je .end0
jne @f
jmp .end0
@@:
stdcall [buf2d_resize],buf_0,ebx,eax,1
mov eax,ObjData
@@ -2104,6 +2105,53 @@ l_libs_start:
lib_3 l_libs lib_name_3, file_name, system_dir_3, import_box_lib
l_libs_end:
align 4
import_libimg:
dd alib_init1
img_is_img dd aimg_is_img
img_info dd aimg_info
img_from_file dd aimg_from_file
img_to_file dd aimg_to_file
img_from_rgb dd aimg_from_rgb
img_to_rgb dd aimg_to_rgb
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_encode dd aimg_encode
img_create dd aimg_create
img_destroy dd aimg_destroy
img_destroy_layer dd aimg_destroy_layer
img_count dd aimg_count
img_lock_bits dd aimg_lock_bits
img_unlock_bits dd aimg_unlock_bits
img_flip dd aimg_flip
img_flip_layer dd aimg_flip_layer
img_rotate dd aimg_rotate
img_rotate_layer dd aimg_rotate_layer
img_draw dd aimg_draw
dd 0,0
alib_init1 db 'lib_init',0
aimg_is_img db 'img_is_img',0 ;<3B><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><><E1A4A5><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
aimg_info db 'img_info',0
aimg_from_file db 'img_from_file',0
aimg_to_file db 'img_to_file',0
aimg_from_rgb db 'img_from_rgb',0
aimg_to_rgb db 'img_to_rgb',0 ;<3B><EFBFBD><EFBFBD><E0A0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> RGB
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<3B><><EFBFBD><E2AEAC><EFBFBD><EFBFBD><EFBFBD><20><><EFBFBD><E0A5A4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_encode db 'img_encode',0
aimg_create db 'img_create',0
aimg_destroy db 'img_destroy',0
aimg_destroy_layer db 'img_destroy_layer',0
aimg_count db 'img_count',0
aimg_lock_bits db 'img_lock_bits',0
aimg_unlock_bits db 'img_unlock_bits',0
aimg_flip db 'img_flip',0
aimg_flip_layer db 'img_flip_layer',0
aimg_rotate db 'img_rotate',0
aimg_rotate_layer db 'img_rotate_layer',0
aimg_draw db 'img_draw',0
align 4
import_proclib:
OpenDialog_Init dd aOpenDialog_Init
@@ -2116,10 +2164,162 @@ dd 0,0
aOpenDialog_Set_file_name db 'OpenDialog_set_file_name',0
aOpenDialog_Set_file_ext db 'OpenDialog_set_file_ext',0
include '../../develop/libraries/libs-dev/libimg/import.inc'
include '../../develop/libraries/buf2d/import.inc'
include '../../develop/libraries/box_lib/import.inc'
align 4
import_buf2d:
init dd sz_init
buf2d_create dd sz_buf2d_create
buf2d_create_f_img dd sz_buf2d_create_f_img
buf2d_clear dd sz_buf2d_clear
buf2d_draw dd sz_buf2d_draw
buf2d_delete dd sz_buf2d_delete
buf2d_resize dd sz_buf2d_resize
buf2d_line dd sz_buf2d_line
buf2d_line_sm dd sz_buf2d_line_sm
buf2d_rect_by_size dd sz_buf2d_rect_by_size
buf2d_filled_rect_by_size dd sz_buf2d_filled_rect_by_size
buf2d_circle dd sz_buf2d_circle
buf2d_img_hdiv2 dd sz_buf2d_img_hdiv2
buf2d_img_wdiv2 dd sz_buf2d_img_wdiv2
buf2d_conv_24_to_8 dd sz_buf2d_conv_24_to_8
buf2d_conv_24_to_32 dd sz_buf2d_conv_24_to_32
buf2d_bit_blt dd sz_buf2d_bit_blt
buf2d_bit_blt_transp dd sz_buf2d_bit_blt_transp
buf2d_bit_blt_alpha dd sz_buf2d_bit_blt_alpha
buf2d_curve_bezier dd sz_buf2d_curve_bezier
buf2d_convert_text_matrix dd sz_buf2d_convert_text_matrix
buf2d_draw_text dd sz_buf2d_draw_text
buf2d_crop_color dd sz_buf2d_crop_color
buf2d_flip_h dd sz_buf2d_flip_h
buf2d_flip_v dd sz_buf2d_flip_v
buf2d_offset_h dd sz_buf2d_offset_h
buf2d_flood_fill dd sz_buf2d_flood_fill
buf2d_set_pixel dd sz_buf2d_set_pixel
dd 0,0
sz_init db 'lib_init',0
sz_buf2d_create db 'buf2d_create',0
sz_buf2d_create_f_img db 'buf2d_create_f_img',0
sz_buf2d_clear db 'buf2d_clear',0
sz_buf2d_draw db 'buf2d_draw',0
sz_buf2d_delete db 'buf2d_delete',0
sz_buf2d_resize db 'buf2d_resize',0
sz_buf2d_line db 'buf2d_line',0
sz_buf2d_line_sm db 'buf2d_line_sm',0
sz_buf2d_rect_by_size db 'buf2d_rect_by_size',0
sz_buf2d_filled_rect_by_size db 'buf2d_filled_rect_by_size',0
sz_buf2d_circle db 'buf2d_circle',0
sz_buf2d_img_hdiv2 db 'buf2d_img_hdiv2',0
sz_buf2d_img_wdiv2 db 'buf2d_img_wdiv2',0
sz_buf2d_conv_24_to_8 db 'buf2d_conv_24_to_8',0
sz_buf2d_conv_24_to_32 db 'buf2d_conv_24_to_32',0
sz_buf2d_bit_blt db 'buf2d_bit_blt',0
sz_buf2d_bit_blt_transp db 'buf2d_bit_blt_transp',0
sz_buf2d_bit_blt_alpha db 'buf2d_bit_blt_alpha',0
sz_buf2d_curve_bezier db 'buf2d_curve_bezier',0
sz_buf2d_convert_text_matrix db 'buf2d_convert_text_matrix',0
sz_buf2d_draw_text db 'buf2d_draw_text',0
sz_buf2d_crop_color db 'buf2d_crop_color',0
sz_buf2d_flip_h db 'buf2d_flip_h',0
sz_buf2d_flip_v db 'buf2d_flip_v',0
sz_buf2d_offset_h db 'buf2d_offset_h',0
sz_buf2d_flood_fill db 'buf2d_flood_fill',0
sz_buf2d_set_pixel db 'buf2d_set_pixel',0
align 4
import_box_lib:
dd sz_init1
init_checkbox dd sz_Init_checkbox
check_box_draw dd sz_Check_box_draw
check_box_mouse dd sz_Check_box_mouse
;version_ch dd sz_Version_ch
option_box_draw dd sz_Option_box_draw
option_box_mouse dd sz_Option_box_mouse
;version_op dd sz_Version_op
edit_box_draw dd sz_edit_box_draw
edit_box_key dd sz_edit_box_key
edit_box_mouse dd sz_edit_box_mouse
edit_box_set_text dd sz_edit_box_set_text
scrollbar_ver_draw dd sz_scrollbar_ver_draw
scrollbar_hor_draw dd sz_scrollbar_hor_draw
tl_data_init dd sz_tl_data_init
tl_data_clear dd sz_tl_data_clear
tl_info_clear dd sz_tl_info_clear
tl_key dd sz_tl_key
tl_mouse dd sz_tl_mouse
tl_draw dd sz_tl_draw
tl_info_undo dd sz_tl_info_undo
tl_info_redo dd sz_tl_info_redo
tl_node_add dd sz_tl_node_add
tl_node_set_data dd sz_tl_node_set_data
tl_node_get_data dd sz_tl_node_get_data
tl_node_delete dd sz_tl_node_delete
tl_node_move_up dd sz_tl_node_move_up
tl_node_move_down dd sz_tl_node_move_down
tl_cur_beg dd sz_tl_cur_beg
tl_cur_next dd sz_tl_cur_next
tl_cur_perv dd sz_tl_cur_perv
tl_node_close_open dd sz_tl_node_close_open
tl_node_lev_inc dd sz_tl_node_lev_inc
tl_node_lev_dec dd sz_tl_node_lev_dec
tl_node_poi_get_info dd sz_tl_node_poi_get_info
tl_node_poi_get_next_info dd sz_tl_node_poi_get_next_info
tl_node_poi_get_data dd sz_tl_node_poi_get_data
dd 0,0
sz_init1 db 'lib_init',0
sz_Init_checkbox db 'init_checkbox2',0
sz_Check_box_draw db 'check_box_draw2',0
sz_Check_box_mouse db 'check_box_mouse2',0
;sz_Version_ch db 'version_ch2',0
sz_Option_box_draw db 'option_box_draw',0
sz_Option_box_mouse db 'option_box_mouse',0
;sz_Version_op db 'version_op',0
sz_edit_box_draw db 'edit_box_draw',0
sz_edit_box_key db 'edit_box_key',0
sz_edit_box_mouse db 'edit_box_mouse',0
sz_edit_box_set_text db 'edit_box_set_text',0
sz_scrollbar_ver_draw db 'scrollbar_v_draw',0
sz_scrollbar_hor_draw db 'scrollbar_h_draw',0
sz_tl_data_init db 'tl_data_init',0
sz_tl_data_clear db 'tl_data_clear',0
sz_tl_info_clear db 'tl_info_clear',0
sz_tl_key db 'tl_key',0
sz_tl_mouse db 'tl_mouse',0
sz_tl_draw db 'tl_draw',0
sz_tl_info_undo db 'tl_info_undo',0
sz_tl_info_redo db 'tl_info_redo',0
sz_tl_node_add db 'tl_node_add',0
sz_tl_node_set_data db 'tl_node_set_data',0
sz_tl_node_get_data db 'tl_node_get_data',0
sz_tl_node_delete db 'tl_node_delete',0
sz_tl_node_move_up db 'tl_node_move_up',0
sz_tl_node_move_down db 'tl_node_move_down',0
sz_tl_cur_beg db 'tl_cur_beg',0
sz_tl_cur_next db 'tl_cur_next',0
sz_tl_cur_perv db 'tl_cur_perv',0
sz_tl_node_close_open db 'tl_node_close_open',0
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
sz_tl_node_poi_get_info db 'tl_node_poi_get_info',0
sz_tl_node_poi_get_next_info db 'tl_node_poi_get_next_info',0
sz_tl_node_poi_get_data db 'tl_node_poi_get_data',0
align 4
mouse_dd dd 0
last_time dd 0
align 16
sc system_colors
align 16
procinfo process_information
align 4
buf_0: dd 0 ;㪠<><E3AAA0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><E0A0A6><EFBFBD><EFBFBD>
@@ -2148,7 +2348,7 @@ buf_png:
align 4
el_focus dd tree1
tree1 tree_list size_one_list,1000+2, tl_key_no_edit+tl_draw_par_line,\
16,16, 0xffffff,0xb0d0ff,0x10400040, 5,35,195-16,340, 16,Figure.Caption,0,\
16,16, 0xffffff,0xb0d0ff,0x400040, 5,35,195-16,340, 16,Figure.Caption,0,\
el_focus,w_scr_t1,0
align 4
@@ -2200,14 +2400,6 @@ endp
align 16
i_end:
mouse_dd dd 0
last_time dd 0
align 16
sc system_colors
align 16
procinfo process_information
rb 2048
thread_coords:
rb 2048

View File

@@ -81,7 +81,148 @@ lib_name_5 db 'kmenu.obj',0
;---------------------------------------------------------------------
include '../../develop/libraries/box_lib/import.inc'
align 4
import_box_lib:
dd alib_init0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ணࠬ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
;edit_box_set_text dd aEdit_box_set_text
;version_ed dd aVersion_ed
init_checkbox dd ainit_checkbox
check_box_draw dd acheck_box_draw
check_box_mouse dd acheck_box_mouse
option_box_draw dd aOption_box_draw
option_box_mouse dd aOption_box_mouse
;version_op dd aVersion_op
scrollbar_ver_draw dd aScrollbar_ver_draw
scrollbar_ver_mouse dd aScrollbar_ver_mouse
scrollbar_hor_draw dd aScrollbar_hor_draw
scrollbar_hor_mouse dd aScrollbar_hor_mouse
;version_scrollbar dd aVersion_scrollbar
tl_data_init dd sz_tl_data_init
tl_data_clear dd sz_tl_data_clear
tl_info_clear dd sz_tl_info_clear
tl_key dd sz_tl_key
tl_mouse dd sz_tl_mouse
tl_draw dd sz_tl_draw
tl_info_undo dd sz_tl_info_undo
tl_info_redo dd sz_tl_info_redo
tl_node_add dd sz_tl_node_add
tl_node_set_data dd sz_tl_node_set_data
tl_node_get_data dd sz_tl_node_get_data
tl_node_delete dd sz_tl_node_delete
tl_cur_beg dd sz_tl_cur_beg
tl_cur_next dd sz_tl_cur_next
tl_cur_perv dd sz_tl_cur_perv
;tl_node_close_open dd sz_tl_node_close_open
tl_node_lev_inc dd sz_tl_node_lev_inc
tl_node_lev_dec dd sz_tl_node_lev_dec
ted_but_sumb_upper dd sz_ted_but_sumb_upper
ted_but_sumb_lover dd sz_ted_but_sumb_lover
ted_but_convert_by_table dd sz_ted_but_convert_by_table
ted_can_save dd sz_ted_can_save
ted_clear dd sz_ted_clear
ted_delete dd sz_ted_delete
ted_draw dd sz_ted_draw
ted_init dd sz_ted_init
ted_init_scroll_bars dd sz_ted_init_scroll_bars
ted_init_syntax_file dd sz_ted_init_syntax_file
ted_is_select dd sz_ted_is_select
ted_key dd sz_ted_key
ted_mouse dd sz_ted_mouse
ted_open_file dd sz_ted_open_file
ted_save_file dd sz_ted_save_file
ted_text_add dd sz_ted_text_add
ted_but_select_word dd sz_ted_but_select_word
ted_but_cut dd sz_ted_but_cut
ted_but_copy dd sz_ted_but_copy
ted_but_paste dd sz_ted_but_paste
ted_but_undo dd sz_ted_but_undo
ted_but_redo dd sz_ted_but_redo
ted_but_reverse dd sz_ted_but_reverse
ted_but_find dd sz_ted_but_find
ted_but_replace dd sz_ted_but_replace
ted_text_colored dd sz_ted_text_colored
ted_go_to_position dd sz_ted_go_to_position
version_text_edit dd sz_ted_version
dd 0,0
alib_init0 db 'lib_init',0
aEdit_box_draw db 'edit_box_draw',0
aEdit_box_key db 'edit_box_key',0
aEdit_box_mouse db 'edit_box_mouse',0
;aEdit_box_set_text db 'edit_box_set_text',0
;aVersion_ed db 'version_ed',0
ainit_checkbox db 'init_checkbox2',0
acheck_box_draw db 'check_box_draw2',0
acheck_box_mouse db 'check_box_mouse2',0
aOption_box_draw db 'option_box_draw',0
aOption_box_mouse db 'option_box_mouse',0
;aVersion_op db 'version_op',0
aScrollbar_ver_draw db 'scrollbar_v_draw',0
aScrollbar_ver_mouse db 'scrollbar_v_mouse',0
aScrollbar_hor_draw db 'scrollbar_h_draw',0
aScrollbar_hor_mouse db 'scrollbar_h_mouse',0
;aVersion_scrollbar db 'version_scrollbar',0
sz_tl_data_init db 'tl_data_init',0
sz_tl_data_clear db 'tl_data_clear',0
sz_tl_info_clear db 'tl_info_clear',0
sz_tl_key db 'tl_key',0
sz_tl_mouse db 'tl_mouse',0
sz_tl_draw db 'tl_draw',0
sz_tl_info_undo db 'tl_info_undo',0
sz_tl_info_redo db 'tl_info_redo',0
sz_tl_node_add db 'tl_node_add',0
sz_tl_node_set_data db 'tl_node_set_data',0
sz_tl_node_get_data db 'tl_node_get_data',0
sz_tl_node_delete db 'tl_node_delete',0
sz_tl_cur_beg db 'tl_cur_beg',0
sz_tl_cur_next db 'tl_cur_next',0
sz_tl_cur_perv db 'tl_cur_perv',0
;sz_tl_node_close_open db 'tl_node_close_open',0
sz_tl_node_lev_inc db 'tl_node_lev_inc',0
sz_tl_node_lev_dec db 'tl_node_lev_dec',0
sz_ted_but_sumb_upper db 'ted_but_sumb_upper',0
sz_ted_but_sumb_lover db 'ted_but_sumb_lover',0
sz_ted_but_convert_by_table db 'ted_but_convert_by_table',0
sz_ted_can_save db 'ted_can_save',0
sz_ted_clear db 'ted_clear',0
sz_ted_delete db 'ted_delete',0
sz_ted_draw db 'ted_draw',0
sz_ted_init db 'ted_init',0
sz_ted_init_scroll_bars db 'ted_init_scroll_bars',0
sz_ted_init_syntax_file db 'ted_init_syntax_file',0
sz_ted_is_select db 'ted_is_select',0
sz_ted_key db 'ted_key',0
sz_ted_mouse db 'ted_mouse',0
sz_ted_open_file db 'ted_open_file',0
sz_ted_save_file db 'ted_save_file',0
sz_ted_text_add db 'ted_text_add',0
sz_ted_but_select_word db 'ted_but_select_word',0
sz_ted_but_cut db 'ted_but_cut',0
sz_ted_but_copy db 'ted_but_copy',0
sz_ted_but_paste db 'ted_but_paste',0
sz_ted_but_undo db 'ted_but_undo',0
sz_ted_but_redo db 'ted_but_redo',0
sz_ted_but_reverse db 'ted_but_reverse',0
sz_ted_but_find db 'ted_but_find',0
sz_ted_but_replace db 'ted_but_replace',0
sz_ted_text_colored db 'ted_text_colored',0
sz_ted_go_to_position db 'ted_go_to_position',0
sz_ted_version db 'version_text_edit',0
align 4
import_proclib:
@@ -100,8 +241,18 @@ dd 0,0
amb_create db 'mb_create',0
amb_reinit db 'mb_reinit',0
amb_setfunctions db 'mb_setfunctions',0
include '../../develop/libraries/libs-dev/libimg/import.inc'
align 4
import_libimg:
dd alib_init1
img_to_rgb2 dd aimg_to_rgb2
img_decode dd aimg_decode
img_destroy dd aimg_destroy
dd 0,0
alib_init1 db 'lib_init',0
aimg_to_rgb2 db 'img_to_rgb2',0
aimg_decode db 'img_decode',0 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
aimg_destroy db 'img_destroy',0
align 4
import_libini:

View File

@@ -394,11 +394,11 @@ p_syntax:
mov ecx,ted_wnd_t
shl ecx,16
mov cx,20
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] ;drawing the top background rectangle
mcall SF_DRAW_RECT,TED_PANEL_WIDTH,,[sc.work] ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [tl_draw], tree1
mov [ws_dir_lbox.all_redraw],1 ;for a complete redraw of the child scroll
stdcall [scrollbar_v_draw], ws_dir_lbox
mov [ws_dir_lbox.all_redraw],1 ;<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
stdcall [scrollbar_ver_draw], ws_dir_lbox
ror ecx,16
add ecx,[tree1.box_height]
@@ -411,7 +411,7 @@ p_syntax:
sub cx,20
sub ecx,[tree1.box_height]
inc cx
int 0x40 ;drawing the bottom background rectangle
int 0x40 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
mov ecx,ted_wnd_t
add ecx,25
@@ -436,7 +436,7 @@ p_syntax:
popad
ret
MIN_M_WND_H equ 100 ;minimum height of main window
MIN_M_WND_H equ 100 ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
;input:
; edi = pointer to tedit struct
align 4

View File

@@ -80,7 +80,7 @@ pushad
@@:
mov dword[w_scr_t3.all_redraw],1
stdcall [scrollbar_v_draw], w_scr_t3
stdcall [scrollbar_ver_draw], w_scr_t3
stdcall [tl_draw], tree3
stdcall [edit_box_draw], edit3
mcall SF_REDRAW,SSF_END_DRAW